mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
fix(login): send back 401 Unauthorized on failed login attempt
This commit is contained in:
committed by
Panagiotis Papadopoulos
parent
3a3f5be7be
commit
fa350e13f6
@@ -134,7 +134,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(),
|
||||
|
||||
Reference in New Issue
Block a user