Skip to content

Commit d5a332c

Browse files
committed
Merge pull request bitly#194 from r4um/validate-state
Validate state param while redirecting.
2 parents 613a342 + f957a1e commit d5a332c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauthproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ func (p *OAuthProxy) OAuthCallback(rw http.ResponseWriter, req *http.Request) {
476476
}
477477

478478
redirect := req.Form.Get("state")
479-
if redirect == "" {
479+
if !strings.HasPrefix(redirect, "/") {
480480
redirect = "/"
481481
}
482482

0 commit comments

Comments
 (0)