diff --git a/models/activitypub/actor.go b/models/activitypub/actor.go index 40952bcf17..3c8f497ff4 100644 --- a/models/activitypub/actor.go +++ b/models/activitypub/actor.go @@ -134,6 +134,10 @@ func ValidateAndParseIRI(unvalidatedIRI string) (url.URL, error) { return url.URL{}, err } + if len(validatedURL.Path) <= 1 { + return url.URL{}, fmt.Errorf("path was empty") + } + return *validatedURL, nil }