From 5b126567bb6cd25b8299ee953042710ef645555f Mon Sep 17 00:00:00 2001 From: Oneric Date: Thu, 7 Mar 2024 23:39:00 +0100 Subject: [PATCH] StealEmoji: drop superfluous basename Since 3 commits ago we restrict shortcodes to a subset of the POSIX Portable Filename Character Set, therefore this can never have a directory component. --- lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex b/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex index 9b2fa3020..da6b8275d 100644 --- a/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/steal_emoji_policy.ex @@ -34,7 +34,6 @@ defp reject_emoji?({shortcode, _url}, installed_emoji) do end defp steal_emoji(%{} = response, {shortcode, extension}, emoji_dir_path) do - shortcode = Path.basename(shortcode) file_path = Path.join(emoji_dir_path, shortcode <> "." <> extension) case File.write(file_path, response.body) do