mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	Merge pull request #1708 from TriliumNext/fix_http-code-failed-login_#1707
fix(login): send back 401 Unauthorized on failed login attempt
This commit is contained in:
		
						commit
						0f06bf43f0
					
				@ -133,7 +133,7 @@ function sendLoginError(req: Request, res: Response, errorType: 'password' | 'to
 | 
			
		||||
        log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    res.render('login', {
 | 
			
		||||
    res.status(401).render('login', {
 | 
			
		||||
        wrongPassword: errorType === 'password',
 | 
			
		||||
        wrongTotp: errorType === 'totp',
 | 
			
		||||
        totpEnabled: totp.isTotpEnabled(),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user