mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-19 03:19:17 +00:00
escape quotation marks in Content-Disposition header
This commit is contained in:
parent
5a73cae2be
commit
92a69bddce
|
@ -27,6 +27,8 @@ def call(%{request_path: <<"/", @path, "/", file::binary>>} = conn, opts) 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}\"")
|
||||
|
||||
|
|
Loading…
Reference in a new issue