mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fixed using timed OTP when backup codes are not allowed (#4268)
This commit is contained in:
		
							parent
							
								
									636f801bd7
								
							
						
					
					
						commit
						138fc507c8
					
				
					 2 changed files with 6 additions and 18 deletions
				
			
		|  | @ -3330,9 +3330,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                     // Do not allow this command if 2FA's are locked
 | ||||
|                     if ((domain.passwordrequirements) && (domain.passwordrequirements.lock2factor == true)) { ws.send(JSON.stringify({ action: 'otpauth-request', err: 1 })); return; } | ||||
| 
 | ||||
|                     // Do not allow this command if backup codes are not allowed
 | ||||
|                     if ((domain.passwordrequirements) && (domain.passwordrequirements.backupcode2factor == false)) { ws.send(JSON.stringify({ action: 'otpauth-request', err: 2 })); return; } | ||||
| 
 | ||||
|                     // Do not allow this command when logged in using a login token
 | ||||
|                     if (req.session.loginToken != null) { ws.send(JSON.stringify({ action: 'otpauth-request', err: 3 })); return; } | ||||
| 
 | ||||
|  | @ -3361,9 +3358,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                     // Do not allow this command if 2FA's are locked
 | ||||
|                     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
 | ||||
|                     if (req.session.loginToken != null) break; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue