Check port in compare_urls

This commit is contained in:
Colin Reeder 2020-10-25 11:22:40 -06:00 committed by Thomas Citharel
parent c3bada8428
commit 1cf59ef24a
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -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