fix: #9007 revoke old sessions after adding

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 54dc449fb9
commit d46740f860

@ -107,8 +107,8 @@ module.exports = function (User) {
return;
}
await cleanExpiredSessions(uid);
await revokeSessionsAboveThreshold(uid, meta.config.maxUserSessions);
await db.sortedSetAdd('uid:' + uid + ':sessions', Date.now(), sessionId);
await revokeSessionsAboveThreshold(uid, meta.config.maxUserSessions);
};
async function revokeSessionsAboveThreshold(uid, maxUserSessions) {

Loading…
Cancel
Save