fix(url/validator): return early if allowed domain is empty

This commit is contained in:
Trong Huu Nguyen
2023-05-03 08:38:12 +02:00
parent c6dc354c34
commit 00432bcfd6

View File

@@ -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()