about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-08-18 03:21:59 +0200
committerGitHub <noreply@github.com>2017-08-18 03:21:59 +0200
commit4edf9d849f5241aed42042577c889549a5b6beaa (patch)
tree78afdc6a3bc0317ad417d52a15eae3995da41722 /app
parent10489b4e4ab75c72f3fb49761cb7e08151752a6e (diff)
Make ActivityPub::TagManager#local_uri? recognize local URIs with ports (#4628)
Diffstat (limited to 'app')
-rw-r--r--app/lib/activitypub/tag_manager.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb
index bd5dddcac..3d7f08cd3 100644
--- 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