diff --git a/lib/pleroma/webhook/notify.ex b/lib/pleroma/webhook/notify.ex index 7dbfc52a0..743bb4012 100644 --- a/lib/pleroma/webhook/notify.ex +++ b/lib/pleroma/webhook/notify.ex @@ -78,6 +78,6 @@ defmodule Pleroma.Webhook.Notify do end defp signature(body, secret) do - :crypto.mac(:hmac, :sha256, secret, body) |> Base.encode16() + :crypto.mac(:hmac, :sha256, secret, body) |> Base.encode16(case: :lower) end end diff --git a/test/pleroma/webhook/notify_test.exs b/test/pleroma/webhook/notify_test.exs index e03890aab..c99489940 100644 --- a/test/pleroma/webhook/notify_test.exs +++ b/test/pleroma/webhook/notify_test.exs @@ -66,7 +66,7 @@ defmodule Pleroma.Webhook.NotifyTest do {"X-Hub-Signature", "sha256=" <> signature} = Enum.find(headers, fn {key, _} -> key == "X-Hub-Signature" end) - assert signature == :crypto.mac(:hmac, :sha256, secret, body) |> Base.encode16() + assert signature == :crypto.mac(:hmac, :sha256, secret, body) |> Base.encode16(case: :lower) %Tesla.Env{status: 200, body: ""} end)