Don't sign fetches to instance actor when refreshing their keys

Closes #963

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-29 10:29:26 +01:00
parent 07d679c4ab
commit 1bfff235f3
4 changed files with 17 additions and 14 deletions

View File

@@ -52,7 +52,8 @@ defmodule Mobilizon.Federation.HTTPSignatures.Signature do
{:ok, String.t()}
| {:error, :actor_not_found | :pem_decode_error}
defp get_public_key_for_url(url) do
with {:ok, %Actor{} = actor} <- ActivityPubActor.get_or_fetch_actor_by_url(url) do
with {:ok, %Actor{} = actor} <-
ActivityPubActor.get_or_fetch_actor_by_url(url, ignore_sign_object_fetches: true) do
get_actor_public_key(actor)
end
end