logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 91c83a82a052ec73c82b9b5576fd5b05c7dc8a74
parent 86e6d395d931f532b18fccdeb65c300b22fbce8a
Author: Mark Felder <feld@feld.me>
Date:   Wed, 14 Feb 2024 17:58:36 -0500

Fix atom leak in background worker

The only permitted values are "blocks_import", "follow_import", "mutes_import" of which we already have the equivalent atoms defined.

Diffstat:

Mlib/pleroma/workers/background_worker.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pleroma/workers/background_worker.ex b/lib/pleroma/workers/background_worker.ex @@ -28,7 +28,7 @@ defmodule Pleroma.Workers.BackgroundWorker do def perform(%Job{args: %{"op" => op, "user_id" => user_id, "identifiers" => identifiers}}) when op in ["blocks_import", "follow_import", "mutes_import"] do user = User.get_cached_by_id(user_id) - {:ok, User.Import.perform(String.to_atom(op), user, identifiers)} + {:ok, User.Import.perform(String.to_existing_atom(op), user, identifiers)} end def perform(%Job{