Fix TagManager#local_url? erroring out on invalid URL (#18580)

main
Claire 3 years ago committed by GitHub
parent 14d7cf39f4
commit 28212bd2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,8 +24,11 @@ class TagManager
def local_url?(url)
uri = Addressable::URI.parse(url).normalize
return false unless uri.host
domain = uri.host + (uri.port ? ":#{uri.port}" : '')
TagManager.instance.web_domain?(domain)
rescue Addressable::URI::InvalidURIError
false
end
end

Loading…
Cancel
Save