Validate state param while redirecting
commitf957a1e4356aa41dba12b21cc174cf90ad77719e
authorPranay Kanwar <pranay.kanwar@gmail.com>
dateTue 19 Jan 2016, 13:14 (11 years ago)
parent613a342
oauthproxy.go+1−1
@@ -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