git.iko.soy/typeable/oauth2-proxy
on master help sign in
check for /\ redirects
commit0198dd6e9378405c432810e190288d796da46e4d authorDavid Stark <david.stark@pusher.com> dateSun 26 Jan 2020, 15:00 (7 years ago) parentd9362d3
1 file changed+1−1
oauthproxy.go+1−1
oauthproxy.go+1−1
@@ -558,7 +558,7 @@ func validOptionalPort(port string) bool {
558558// IsValidRedirect checks whether the redirect URL is whitelisted
559559func (p *OAuthProxy) IsValidRedirect(redirect string) bool {
560560 switch {
561− case strings.HasPrefix(redirect, "/") && !strings.HasPrefix(redirect, "//"):
561+ case strings.HasPrefix(redirect, "/") && !strings.HasPrefix(redirect, "//") && !strings.HasPrefix(redirect, "/\\"):
562562 return true
563563 case strings.HasPrefix(redirect, "http://") || strings.HasPrefix(redirect, "https://"):
564564 redirectURL, err := url.Parse(redirect)