mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 06:13:43 +01:00
Fix TagManager#local_url? erroring out on invalid URL (#18580)
This commit is contained in:
parent
14d7cf39f4
commit
28212bd2be
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue