Make ActivityPub::TagManager#local_uri? recognize local URIs with ports (#4628)

pull/4633/head
Eugen Rochko 2017-08-18 03:21:59 +02:00 committed by GitHub
parent 10489b4e4a
commit 4edf9d849f
1 changed files with 4 additions and 1 deletions

View File

@ -70,7 +70,10 @@ class ActivityPub::TagManager
end end
def local_uri?(uri) def local_uri?(uri)
host = Addressable::URI.parse(uri).normalized_host uri = Addressable::URI.parse(uri)
host = uri.normalized_host
host = "#{host}:#{uri.port}" if uri.port
!host.nil? && (::TagManager.instance.local_domain?(host) || ::TagManager.instance.web_domain?(host)) !host.nil? && (::TagManager.instance.local_domain?(host) || ::TagManager.instance.web_domain?(host))
end end