mirror of
https://github.com/volatiletech/authboss.git
synced 2025-01-22 05:09:42 +02:00
Merge branch 'rbren/patch-1' into master
This commit is contained in:
commit
0a2c2aafa0
@ -77,6 +77,10 @@ func (r *Redirector) Redirect(w http.ResponseWriter, req *http.Request, ro authb
|
||||
func (r Redirector) redirectAPI(w http.ResponseWriter, req *http.Request, ro authboss.RedirectOptions) error {
|
||||
path := ro.RedirectPath
|
||||
redir := req.FormValue(r.FormValueName)
|
||||
if strings.Contains(redir, "://") {
|
||||
// Guard against Open Redirect: https://cwe.mitre.org/data/definitions/601.html
|
||||
redir = ""
|
||||
}
|
||||
if len(redir) != 0 && ro.FollowRedirParam {
|
||||
path = redir
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user