Commit 59ad395f authored by lain's avatar lain

Better signature errors messages.

parent 13ea3eaf
Pipeline #834 failed with stage
in 2 minutes and 6 seconds
...@@ -34,9 +34,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do ...@@ -34,9 +34,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
end end
def inbox(conn, params) do def inbox(conn, params) do
Logger.info("Signature error.") if !(String.contains(conn.req_headers["signature"] || "", params["actor"])) do
Logger.info("Could not validate #{params["actor"]}") Logger.info("Signature not from author, relayed message, ignoring.")
Logger.info(inspect(conn.req_headers)) else
Logger.info("Signature error.")
Logger.info("Could not validate #{params["actor"]}")
Logger.info(inspect(conn.req_headers))
end
json(conn, "ok") json(conn, "ok")
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