mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +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:
parent
3a2c6afc0d
commit
3d3c01b276
1 changed files with 8 additions and 2 deletions
|
@ -161,9 +161,15 @@ defmodule Mobilizon.Web.ActivityPubController do
|
||||||
)
|
)
|
||||||
|
|
||||||
Logger.debug(inspect(conn.req_headers))
|
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
|
end
|
||||||
|
|
||||||
def relay(conn, _params) do
|
def relay(conn, _params) do
|
||||||
|
|
Loading…
Reference in a new issue