logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 4edf9d849f5241aed42042577c889549a5b6beaa
parent: 10489b4e4ab75c72f3fb49761cb7e08151752a6e
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Fri, 18 Aug 2017 03:21:59 +0200

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


Diffstat:

Mapp/lib/activitypub/tag_manager.rb5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb @@ -70,7 +70,10 @@ class ActivityPub::TagManager end 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)) end