Exclude deactivated users from emoji reaction lists #592

Merged
floatingghost merged 6 commits from active-emoji-reactions into develop 2023-07-17 18:49:16 +00:00
Showing only changes of commit c8904f15a2 - Show all commits

View file

@ -84,8 +84,13 @@ defmodule Pleroma.Web.MediaProxy do
end
def blocked?(url) do
%{host: domain} = URI.parse(url)
domain in Config.get([:media_proxy, :whitelist])
%{scheme: scheme, host: domain} = URI.parse(url)
# Block either the bare domain or the scheme-domain combo
scheme_domain = "#{scheme}://#{domain}"
blocklist = Config.get([:media_proxy, :blocklist])
Enum.member?(blocklist, domain) ||
Enum.member?(blocklist, scheme_domain)
end
defp maybe_get_domain_from_url("http" <> _ = url) do