From ac25b051ae5d5b7a5b9e39e58f43606bd49d1021 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Sat, 26 Oct 2024 07:28:28 +0100 Subject: [PATCH] remove previous "allow user routes" functionality --- .../web/plugs/mapped_signature_to_identity_plug.ex | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/pleroma/web/plugs/mapped_signature_to_identity_plug.ex b/lib/pleroma/web/plugs/mapped_signature_to_identity_plug.ex index 93d269187..94ff17cc1 100644 --- a/lib/pleroma/web/plugs/mapped_signature_to_identity_plug.ex +++ b/lib/pleroma/web/plugs/mapped_signature_to_identity_plug.ex @@ -67,7 +67,8 @@ def call(%{assigns: %{valid_signature: true}} = conn, _opts) do Logger.debug("Failed to map identity from signature (lookup failure)") Logger.debug("key_id=#{inspect(key_id_from_conn(conn))}") - only_permit_user_routes(conn) + conn + |> assign(:valid_signature, false) _ -> Logger.debug("Failed to map identity from signature (no payload actor mismatch)") @@ -81,16 +82,6 @@ def call(%{assigns: %{valid_signature: true}} = conn, _opts) do # no signature at all def call(conn, _opts), do: conn - defp only_permit_user_routes(%{path_info: ["users", _]} = conn) do - conn - |> assign(:limited_ap, true) - end - - defp only_permit_user_routes(conn) do - conn - |> assign(:valid_signature, false) - end - defp key_id_from_conn(conn) do case HTTPSignatures.signature_for_conn(conn) do %{"keyId" => key_id} when is_binary(key_id) ->