Fix signing bug.
authorlain <lain@soykaf.club>
Sun, 25 Feb 2018 19:15:04 +0000 (20:15 +0100)
committerlain <lain@soykaf.club>
Sun, 25 Feb 2018 19:15:04 +0000 (20:15 +0100)
lib/pleroma/plugs/http_signature.ex

index 9236c501c39c46c8028b27a3c2be3da09a8c6041..d2d4bdd635c31e2adc4ae4ab75724f41956bda93 100644 (file)
@@ -16,7 +16,7 @@ defmodule Pleroma.Web.Plugs.HTTPSignaturePlug do
     Logger.debug("Checking sig for #{user}")
     if get_req_header(conn, "signature") do
       conn = conn
-      |> put_req_header("(request-target)", String.downcase("#{conn.method} #{conn.request_path}"))
+      |> put_req_header("(request-target)", String.downcase("#{conn.method}") <> " #{conn.request_path}")
 
       assign(conn, :valid_signature, HTTPSignatures.validate_conn(conn))
     else