Skip to content
Snippets Groups Projects
Commit 92a69bdd authored by rinpatch's avatar rinpatch
Browse files

escape quotation marks in Content-Disposition header

parent 5a73cae2
Branches
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@ defmodule Pleroma.Plugs.UploadedMedia do
conn =
case fetch_query_params(conn) do
%{query_params: %{"name" => name}} = conn ->
name = String.replace(name, "\"", "\\\"")
conn
|> put_resp_header("Content-Disposition", "filename=\"#{name}\"")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment