Fix issue with host header parsing
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
28336f1b53
commit
6b4860b217
|
@ -73,7 +73,7 @@ defmodule Mobilizon.Service.HTTPSignatures do
|
|||
|
||||
def validate_conn(conn, public_key) do
|
||||
headers = Enum.into(conn.req_headers, %{})
|
||||
[host_without_port, _] = String.split(headers["host"], ":")
|
||||
host_without_port = String.split(headers["host"], ":") |> hd
|
||||
headers = Map.put(headers, "host", host_without_port)
|
||||
signature = split_signature(headers["signature"])
|
||||
validate(headers, signature, public_key)
|
||||
|
|
Loading…
Reference in a new issue