Commit ac67453e authored by lain's avatar lain

More logging for signature problems.

parent e5fcc51a
Pipeline #830 failed with stage
in 2 minutes and 47 seconds
......@@ -20,6 +20,7 @@ defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
else
Logger.debug("No signature header!")
conn
end
end
......
......@@ -2,6 +2,7 @@
defmodule Pleroma.Web.HTTPSignatures do
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
require Logger
def split_signature(sig) do
default = %{"headers" => "date"}
......@@ -32,6 +33,7 @@ defmodule Pleroma.Web.HTTPSignatures do
if validate_conn(conn, public_key) do
true
else
Logger.debug("Could not validate, re-fetching user and trying one more time.")
# Fetch user anew and try one more time
with actor_id <- conn.params["actor"],
{:ok, _user} <- ActivityPub.make_user_from_ap_id(actor_id),
......@@ -40,7 +42,8 @@ defmodule Pleroma.Web.HTTPSignatures do
end
end
else
_ -> false
e ->
Logger.debug("Could not public key!")
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment