Skip to content
Snippets Groups Projects
Commit 299da42e authored by Zachary Carter's avatar Zachary Carter
Browse files

fix regression with original patch for initiating/verifying forgotten password in same browser

parent 8a63fbd9
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ exports.process = function(req, res) {
// browser as the initiator
var must_auth = true;
if (uid && req.session.userid === uid &&
if (((uid && req.session.userid === uid) || !req.session.userid) &&
typeof req.session.pendingReset === 'string' &&
req.params.token === req.session.pendingReset) {
must_auth = false;
......
......@@ -232,6 +232,7 @@ suite.addBatch({
assert.equal(r.code, 200);
var body = JSON.parse(r.body);
assert.strictEqual(body.success, true);
assert.strictEqual(body.must_auth, false);
}
}
});
......
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