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

don't require the user to sign in with a password as a side effect of using a...

don't require the user to sign in with a password as a side effect of using a primary email address.  closes #1049
parent 266608ac
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,15 @@ function authenticateSession(session, uid, level) {
if (['assertion', 'password'].indexOf(level) === -1)
throw "invalid authentication level: " + level;
session.userid = uid;
session.auth_level = level;
// if the user is *already* authenticated as this uid with an equal or better
// level of auth, let's not lower them. Issue #1049
if (session.userid === uid && session.auth_level === 'password' &&
session.auth_level !== level) {
logger.info("not resetting cookies to 'assertion' authenticate a user who is already password authenticated");
} else {
session.userid = uid;
session.auth_level = level;
}
}
function checkPassword(pass) {
......
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