aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-11-27 17:42:45 +0100
committerlain <lain@soykaf.club>2018-11-27 17:42:45 +0100
commitec464ef20af289769ea69520e58791777f62554b (patch)
treed9f71f2b42be6257cfaa39a1d9b4316a64bf55b6 /lib
parentf983c1d0c6f83f80b06267479646e00421ada543 (diff)
downloadpleroma-ec464ef20af289769ea69520e58791777f62554b.tar.gz
HTTP sig fixes.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user/info.ex10
-rw-r--r--lib/pleroma/web/http_signatures/http_signatures.ex2
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/pleroma/user/info.ex b/lib/pleroma/user/info.ex
index eaf1583e7..630e9129a 100644
--- a/lib/pleroma/user/info.ex
+++ b/lib/pleroma/user/info.ex
@@ -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}
diff --git a/lib/pleroma/web/http_signatures/http_signatures.ex b/lib/pleroma/web/http_signatures/http_signatures.ex
index 5e42a871b..0e54debd5 100644
--- a/lib/pleroma/web/http_signatures/http_signatures.ex
+++ b/lib/pleroma/web/http_signatures/http_signatures.ex
@@ -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))