check for /\ redirects
This commit is contained in:
		
							parent
							
								
									d9362d3bb9
								
							
						
					
					
						commit
						0198dd6e93
					
				|  | @ -558,7 +558,7 @@ func validOptionalPort(port string) bool { | |||
| // IsValidRedirect checks whether the redirect URL is whitelisted
 | ||||
| func (p *OAuthProxy) IsValidRedirect(redirect string) bool { | ||||
| 	switch { | ||||
| 	case strings.HasPrefix(redirect, "/") && !strings.HasPrefix(redirect, "//"): | ||||
| 	case strings.HasPrefix(redirect, "/") && !strings.HasPrefix(redirect, "//") && !strings.HasPrefix(redirect, "/\\"): | ||||
| 		return true | ||||
| 	case strings.HasPrefix(redirect, "http://") || strings.HasPrefix(redirect, "https://"): | ||||
| 		redirectURL, err := url.Parse(redirect) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue