mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-06-01 08:28:06 +00:00
Switch to filtering out various xml and html types by focusing on the subtype
This commit is contained in:
parent
70023a1571
commit
33d566f2ac
|
@ -118,15 +118,10 @@ defmodule Pleroma.Web.Plugs.UploadedMedia do
|
|||
|
||||
[_type, subtype] = String.split(mimetype, "/")
|
||||
|
||||
cond do
|
||||
String.contains?(subtype, ["javascript", "ecmascript", "jscript"]) ->
|
||||
plaintext_header()
|
||||
|
||||
String.contains?(mimetype, ["text/html", "text/xml", "application/xml"]) ->
|
||||
plaintext_header()
|
||||
|
||||
true ->
|
||||
[]
|
||||
if String.contains?(subtype, ["javascript", "ecmascript", "jscript", "html", "xml"]) do
|
||||
plaintext_header()
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue