projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add SetLocalePlug
[akkoma]
/
lib
/
pleroma
/
plugs
/
uploaded_media.ex
diff --git
a/lib/pleroma/plugs/uploaded_media.ex
b/lib/pleroma/plugs/uploaded_media.ex
index 15f447ded319d97767592f0ffb17b999d40b1fac..8d0fac7eed37e5ff78e021567dd1a4152390ec3b 100644
(file)
--- a/
lib/pleroma/plugs/uploaded_media.ex
+++ b/
lib/pleroma/plugs/uploaded_media.ex
@@
-27,14
+27,16
@@
defmodule Pleroma.Plugs.UploadedMedia do
conn =
case fetch_query_params(conn) do
%{query_params: %{"name" => name}} = conn ->
conn =
case fetch_query_params(conn) do
%{query_params: %{"name" => name}} = conn ->
+ name = String.replace(name, "\"", "\\\"")
+
conn
conn
- |> put_resp_header("
Content-D
isposition", "filename=\"#{name}\"")
+ |> put_resp_header("
content-d
isposition", "filename=\"#{name}\"")
conn ->
conn
end
conn ->
conn
end
- config = Pleroma.Config.get(
[Pleroma.Upload]
)
+ config = Pleroma.Config.get(
Pleroma.Upload
)
with uploader <- Keyword.fetch!(config, :uploader),
proxy_remote = Keyword.get(config, :proxy_remote, false),
with uploader <- Keyword.fetch!(config, :uploader),
proxy_remote = Keyword.get(config, :proxy_remote, false),