mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 15:05:45 +00:00
HTTP sig fixes.
This commit is contained in:
parent
f983c1d0c6
commit
ec464ef20a
|
@ -98,6 +98,16 @@ defmodule Pleroma.User.Info do
|
|||
])
|
||||
end
|
||||
|
||||
def user_upgrade(info, params) do
|
||||
info
|
||||
|> cast(params, [
|
||||
:ap_enabled,
|
||||
:source_data,
|
||||
:banner,
|
||||
:locked
|
||||
])
|
||||
end
|
||||
|
||||
def set_source_data(info, source_data) do
|
||||
params = %{source_data: source_data}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ defmodule Pleroma.Web.HTTPSignatures do
|
|||
end
|
||||
|
||||
def sign(user, headers) do
|
||||
with {:ok, %{info: %{"keys" => keys}}} <- Pleroma.Web.WebFinger.ensure_keys_present(user),
|
||||
with {:ok, %{info: %{keys: keys}}} <- Pleroma.Web.WebFinger.ensure_keys_present(user),
|
||||
{:ok, private_key, _} = Pleroma.Web.Salmon.keys_from_pem(keys) do
|
||||
sigstring = build_signing_string(headers, Map.keys(headers))
|
||||
|
||||
|
|
Loading…
Reference in a new issue