From d954d709e2f9398990b77fae08ee3b2d9010350e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 16 Jun 2020 17:55:08 +0100 Subject: [PATCH] Replace quotes only, instead of using strconv.Quote --- mediaapi/routing/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediaapi/routing/download.go b/mediaapi/routing/download.go index 4d1f539cc..3ce4ba395 100644 --- a/mediaapi/routing/download.go +++ b/mediaapi/routing/download.go @@ -309,7 +309,7 @@ func (r *downloadRequest) respondFromLocalFile( } w.Header().Set("Content-Disposition", fmt.Sprintf( `inline; filename=utf-8"%s"`, - strconv.Quote(uploadName), + strings.ReplaceAll(uploadName, `"`, `\"`), // escape quote marks only, as per RFC6266 )) } }