From f6cebdad9813026b2909fadc4e43adcdc4d78b10 Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 8 Oct 2015 20:46:15 +0200 Subject: Fix decode error if pad name contains special characters and is sanitized --- src/node/hooks/express/padurlsanitize.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/node/hooks/express/padurlsanitize.js') diff --git a/src/node/hooks/express/padurlsanitize.js b/src/node/hooks/express/padurlsanitize.js index 94cbe36a..a9972220 100644 --- a/src/node/hooks/express/padurlsanitize.js +++ b/src/node/hooks/express/padurlsanitize.js @@ -16,6 +16,7 @@ exports.expressCreateServer = function (hook_name, args, cb) { if(sanitizedPadId != padId) { var real_url = sanitizedPadId; + real_url = encodeURIComponent(real_url); var query = url.parse(req.url).query; if ( query ) real_url += '?' + query; res.header('Location', real_url); -- cgit v1.2.3