Skip to content
Snippets Groups Projects
Commit d0c374d3 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

fix bug in registration_status wsapi - should always return 400 when no reg is pending on session

parent 5ecd2512
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ exports.stage_user = function(req, resp) {
};
exports.registration_status = function(req, resp) {
if (!req.session || !typeof req.session.pendingRegistration == 'string') {
if (!req.session || !(typeof req.session.pendingRegistration === 'string')) {
httputils.badRequest(
resp,
"api abuse: registration_status called without a pending email for registration");
......@@ -117,7 +117,7 @@ exports.authenticate_user = function(req, resp) {
db.checkAuth(getArgs.email, getArgs.pass, function(rv) {
if (rv) {
if (!req.session) req.session = {};
if (!req.session) req.session = {};
req.session.authenticatedUser = getArgs.email;
}
httputils.jsonResponse(resp, rv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment