1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-21 15:32:32 +00:00

fix(activitypub): reject unsigned or badly signed activity with correct http error code

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-12-04 08:27:57 +01:00
parent 3a2c6afc0d
commit 3d3c01b276
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -161,9 +161,15 @@ defmodule Mobilizon.Web.ActivityPubController do
)
Logger.debug(inspect(conn.req_headers))
end
json(conn, "error")
conn
|> put_status(:forbidden)
|> json("ActivityPub signature could not be checked")
else
conn
|> put_status(:unauthorized)
|> json("ActivityPub signature could not be found")
end
end
def relay(conn, _params) do