mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-14 03:24:04 +00:00
normalize hex number.
This commit is contained in:
parent
1422e7aa84
commit
59d4cc6036
|
@ -34,6 +34,7 @@ defmodule Pleroma.Web.Websub.WebsubController do
|
||||||
|
|
||||||
def websub_incoming(conn, %{"id" => id}) do
|
def websub_incoming(conn, %{"id" => id}) do
|
||||||
with "sha1=" <> signature <- hd(get_req_header(conn, "x-hub-signature")),
|
with "sha1=" <> signature <- hd(get_req_header(conn, "x-hub-signature")),
|
||||||
|
signature <- String.upcase(signature),
|
||||||
%WebsubClientSubscription{} = websub <- Repo.get(WebsubClientSubscription, id),
|
%WebsubClientSubscription{} = websub <- Repo.get(WebsubClientSubscription, id),
|
||||||
{:ok, body, _conn} = read_body(conn),
|
{:ok, body, _conn} = read_body(conn),
|
||||||
^signature <- Websub.sign(websub.secret, body) do
|
^signature <- Websub.sign(websub.secret, body) do
|
||||||
|
|
Loading…
Reference in a new issue