From 1829a67120b0a82dfe130e5c5215475c8ac74d9f Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 6 Apr 2017 16:43:19 -0700 Subject: Quote blob filenames better. Fix %DPzqOq/f6/S9V1/ZRaIVoniRDJlbSNfC1mrW6IgfgDc=.sha256 --- lib/serve.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/serve.js') diff --git a/lib/serve.js b/lib/serve.js index ca6b2ae..d0e2e26 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -47,7 +47,8 @@ function ctype(name) { } function encodeDispositionFilename(fname) { - return '"' + fname.replace(/\/g/, '\\\\').replace(/"/, '\\\"') + '"' + fname = fname.replace(/\/g/, '\\\\').replace(/"/, '\\\"') + return '"' + encodeURIComponent(fname) + '"' } function Serve(app, req, res) { -- cgit v1.2.3