User: generate private keys on user creation
This fixes a race condition bug where keys could be regenerated post-federation, causing activities and HTTP signatures from an user to be dropped due to key differences.
This commit is contained in:
parent
84a573877a
commit
cd237d22f1
9 changed files with 32 additions and 88 deletions
|
|
@ -61,10 +61,8 @@ defmodule Pleroma.Web.Federator do
|
|||
def perform(:publish, activity) do
|
||||
Logger.debug(fn -> "Running publish for #{activity.data["id"]}" end)
|
||||
|
||||
with %User{} = actor <- User.get_cached_by_ap_id(activity.data["actor"]),
|
||||
{:ok, actor} <- User.ensure_keys_present(actor) do
|
||||
Publisher.publish(actor, activity)
|
||||
end
|
||||
%User{} = actor = User.get_cached_by_ap_id(activity.data["actor"])
|
||||
Publisher.publish(actor, activity)
|
||||
end
|
||||
|
||||
def perform(:incoming_ap_doc, params) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue