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 paultranvan committed Apr 4, 2016
1 parent 4c43cfd commit 848206d
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 @@ -33,6 +33,6 @@ module.exports.isAuthenticated = (req, res, next) ->
next()
else
url = "/login"
url += "?next=#{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

0 comments on commit 848206d

Please sign in to comment.