mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-07 17:06:57 +00:00
fix(url/validator): return early if allowed domain is empty
This commit is contained in:
@@ -129,6 +129,10 @@ func isValidAbsolutePath(redirect string) bool {
|
||||
}
|
||||
|
||||
func isAllowedDomain(u *url.URL, allowed string) bool {
|
||||
if len(allowed) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
host := u.Host
|
||||
hostname := u.Hostname()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user