mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-10 00:15:39 +02:00
allow redirects to whitelisted hosts with ports
This commit is contained in:
+1
-1
@@ -505,7 +505,7 @@ func (p *OAuthProxy) IsValidRedirect(redirect string) bool {
|
||||
return false
|
||||
}
|
||||
for _, domain := range p.whitelistDomains {
|
||||
if (redirectURL.Host == domain) || (strings.HasPrefix(domain, ".") && strings.HasSuffix(redirectURL.Host, domain)) {
|
||||
if (redirectURL.Hostname() == domain) || (strings.HasPrefix(domain, ".") && strings.HasSuffix(redirectURL.Hostname(), domain)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user