mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 11:16:11 +01:00
Check for empty path in IRI
This commit is contained in:
parent
f84e0b27e1
commit
25d34e0c14
|
@ -134,6 +134,10 @@ func ValidateAndParseIRI(unvalidatedIRI string) (url.URL, error) {
|
||||||
return url.URL{}, err
|
return url.URL{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(validatedURL.Path) <= 1 {
|
||||||
|
return url.URL{}, fmt.Errorf("path was empty")
|
||||||
|
}
|
||||||
|
|
||||||
return *validatedURL, nil
|
return *validatedURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue