mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
Fixed clearing timed OTP when backup codes are not allowed (#4268)
This commit is contained in:
parent
138fc507c8
commit
c7561b5dd8
@ -3397,9 +3397,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
// Do not allow this command if 2FA's are locked
|
// Do not allow this command if 2FA's are locked
|
||||||
if ((domain.passwordrequirements) && (domain.passwordrequirements.lock2factor == true)) return;
|
if ((domain.passwordrequirements) && (domain.passwordrequirements.lock2factor == true)) return;
|
||||||
|
|
||||||
// Do not allow this command if backup codes are not allowed
|
|
||||||
if ((domain.passwordrequirements) && (domain.passwordrequirements.backupcode2factor == false)) return;
|
|
||||||
|
|
||||||
// Do not allow this command when logged in using a login token
|
// Do not allow this command when logged in using a login token
|
||||||
if (req.session.loginToken != null) break;
|
if (req.session.loginToken != null) break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user