@@ -598,6 +598,9 @@ func validOptionalPort(port string) bool {
598598// IsValidRedirect checks whether the redirect URL is whitelisted
599599func (p *OAuthProxy) IsValidRedirect(redirect string) bool {
600600 switch {
601+ case redirect == "":
602+ // The user didn't specify a redirect, should fallback to `/`
603+ return false
601604 case strings.HasPrefix(redirect, "/") && !strings.HasPrefix(redirect, "//") && !invalidRedirectRegex.MatchString(redirect):
602605 return true
603606 case strings.HasPrefix(redirect, "http://") || strings.HasPrefix(redirect, "https://"):