projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only fetch if it's http.
[akkoma]
/
lib
/
pleroma
/
plugs
/
http_signature.ex
diff --git
a/lib/pleroma/plugs/http_signature.ex
b/lib/pleroma/plugs/http_signature.ex
index 9236c501c39c46c8028b27a3c2be3da09a8c6041..af160f3ee4fe3ec979795e32f12eb14c830bfa3f 100644
(file)
--- a/
lib/pleroma/plugs/http_signature.ex
+++ b/
lib/pleroma/plugs/http_signature.ex
@@
-14,9
+14,14
@@
defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
def call(conn, opts) do
user = conn.params["actor"]
Logger.debug("Checking sig for #{user}")
def call(conn, opts) do
user = conn.params["actor"]
Logger.debug("Checking sig for #{user}")
+
if get_req_header(conn, "signature") do
if get_req_header(conn, "signature") do
- conn = conn
- |> put_req_header("(request-target)", String.downcase("#{conn.method} #{conn.request_path}"))
+ conn =
+ conn
+ |> put_req_header(
+ "(request-target)",
+ String.downcase("#{conn.method}") <> " #{conn.request_path}"
+ )
assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
else
assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
else