From 9cfc66d4b0adf2ed696f5648a86ff2aad871c624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt?= Date: Mon, 7 Dec 2015 21:30:28 +0100 Subject: [PATCH] Correct urlencode ? for redirection from login when user isn t auth. #215 --- server/middlewares/authentication.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middlewares/authentication.coffee b/server/middlewares/authentication.coffee index 3bd35a62..85ab2d56 100644 --- a/server/middlewares/authentication.coffee +++ b/server/middlewares/authentication.coffee @@ -71,7 +71,7 @@ module.exports.isAuthenticated = (req, res, next) -> next() else url = "/login" - url += "?next=#{encodeURIComponent req.url}" unless req.url is '/' + url += "?next=#{req.url.replace "?", "%3F"}" unless req.url is '/' url += "&#{qs.stringify req.query}" if req.query.length res.redirect url