diff --git a/package.json b/package.json index 638be586..8e108cc7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.22.3", + "version": "3.22.4", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/src/web/auth.js b/src/web/auth.js index ac3cbcc1..d3bd50ea 100644 --- a/src/web/auth.js +++ b/src/web/auth.js @@ -113,9 +113,13 @@ function handleLoginPage(req, res) { }); } - sendPug(res, "login", { - redirect: req.query.dest || req.header("referer") - }); + var redirect = req.query.dest || req.header("referer"); + var locals = {}; + if (!/\/register/.test(redirect)) { + locals.redirect = redirect; + } + + sendPug(res, "login", locals); } /**