mirror of https://github.com/calzoneman/sync.git
Fix age old bug with /login redirecting to /register after registration
This commit is contained in:
parent
c88c63a422
commit
35a8e2b52a
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue