summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean King <seanking2919@protonmail.com>2023-06-21 23:10:56 -0600
committerSean King <seanking2919@protonmail.com>2023-06-21 23:10:56 -0600
commita5a354a36e144c19ce3f9e79cb898227fc7ef723 (patch)
treeac67341c04cd7ba6fdde758566d5409ee8865654 /lib
parent589301ce0655c5a31d037f27fc1767e6dffb5381 (diff)
downloadpleroma-a5a354a36e144c19ce3f9e79cb898227fc7ef723.tar.gz
pleroma-a5a354a36e144c19ce3f9e79cb898227fc7ef723.zip
Prevent bypassing authorized fetch mode with a json file
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/plugs/http_signature_plug.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/plugs/http_signature_plug.ex b/lib/pleroma/web/plugs/http_signature_plug.ex
index 4bf325218..e814efc2c 100644
--- 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()