From 1fd94ed001c6413301b4c1cd1fb4c8f7bf5f4867 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 14 Apr 2023 17:42:40 +0100 Subject: [PATCH] ensure only pickable frontends can be returned --- lib/pleroma/web/plugs/frontend_static.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/plugs/frontend_static.ex b/lib/pleroma/web/plugs/frontend_static.ex index 6c0186f14..f1df185e3 100644 --- a/lib/pleroma/web/plugs/frontend_static.ex +++ b/lib/pleroma/web/plugs/frontend_static.ex @@ -76,7 +76,11 @@ defmodule Pleroma.Web.Plugs.FrontendStatic do :primary frontend -> - frontend + if Enum.member?(Pleroma.Config.get([:frontends, :pickable], []), frontend) do + frontend + else + :primary + end end end