Skip to content

Commit

Permalink
Correct urlencode ? for redirection from login when user isn t auth. c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoît authored and Ljinod committed Apr 29, 2016
1 parent 52ecc8e commit 9cfc66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/middlewares/authentication.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9cfc66d

Please sign in to comment.