Skip to content

Commit

Permalink
Merge branch 'rbren/patch-1' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondl committed Sep 18, 2020
2 parents ecd0e44 + 7d0371e commit 0a2c2aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0a2c2aa

Please sign in to comment.