Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Accept only a local path as the way back in
is_safe_redirect looked at the first two characters alone, so it accepted https://evil.example/ and javascript:x. Neither could be signed today only because cgit always signs a url that starts with virtual-root, and nothing tested that. A target now has to start with a single slash, which needs virtual-root to be a path for logins to work, as it is by default.
Diffstat (limited to 'custom/extensions/auth-file.lua')
-rw-r--r--custom/extensions/auth-file.lua10
1 file changed, 6 insertions, 4 deletions