Fix the req_headers formatting

This commit is contained in:
Mark Felder 2023-12-08 21:51:36 -05:00
parent 1d417d2a36
commit 4039106500
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,10 @@ defmodule Pleroma.Workers.ReceiverWorker do
def perform(%Job{
args: %{"op" => "incoming_ap_doc", "req_headers" => req_headers, "params" => params}
}) do
# Oban's serialization converts our tuple headers to lists.
# Revert it for the signature validation.
req_headers = Enum.into(req_headers, [], &List.to_tuple(&1))
conn_data = %{params: params, req_headers: req_headers}
with {:ok, %User{} = _actor} <- User.get_or_fetch_by_ap_id(conn_data.params["actor"]),