From 1cf59ef24a3ab4bc288d8404c9ce309054acd35a Mon Sep 17 00:00:00 2001 From: Colin Reeder Date: Sun, 25 Oct 2020 11:22:40 -0600 Subject: [PATCH] Check port in compare_urls --- lib/federation/activity_pub/utils.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/federation/activity_pub/utils.ex b/lib/federation/activity_pub/utils.ex index 6f9a64413..585bc4003 100644 --- a/lib/federation/activity_pub/utils.ex +++ b/lib/federation/activity_pub/utils.ex @@ -273,7 +273,8 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do compare_uris?(uri_1, uri_2) end - defp compare_uris?(%URI{} = id_uri, %URI{} = other_uri), do: id_uri.host == other_uri.host + defp compare_uris?(%URI{} = id_uri, %URI{} = other_uri), + do: id_uri.host == other_uri.host && id_uri.port == other_uri.port @spec origin_check_from_id?(String.t(), String.t()) :: boolean() def origin_check_from_id?(id, other_id) when is_binary(other_id) do