HTTP sig fixes.
authorlain <lain@soykaf.club>
Tue, 27 Nov 2018 16:42:45 +0000 (17:42 +0100)
committerlain <lain@soykaf.club>
Tue, 27 Nov 2018 16:42:45 +0000 (17:42 +0100)
lib/pleroma/user/info.ex
lib/pleroma/web/http_signatures/http_signatures.ex

index eaf1583e758a4ac7b8d90b299847ce86b809ee5b..630e9129afbab89c411145875c6ce49aa0e9b4ac 100644 (file)
@@ -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}
 
index 5e42a871b682dc6945e863830d0b9dfc5e9e2721..0e54debd54e6c648d118f62bce5af1454c2c3785 100644 (file)
@@ -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))