logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: a5a354a36e144c19ce3f9e79cb898227fc7ef723
parent 589301ce0655c5a31d037f27fc1767e6dffb5381
Author: Sean King <seanking2919@protonmail.com>
Date:   Wed, 21 Jun 2023 23:10:56 -0600

Prevent bypassing authorized fetch mode with a json file

Diffstat:

Mlib/pleroma/web/plugs/http_signature_plug.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pleroma/web/plugs/http_signature_plug.ex b/lib/pleroma/web/plugs/http_signature_plug.ex @@ -16,7 +16,7 @@ defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do end def call(conn, _opts) do - if get_format(conn) == "activity+json" do + if get_format(conn) in ["json", "activity+json"] do conn |> maybe_assign_valid_signature() |> maybe_require_signature()