mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
fix(login): send back 401 Unauthorized on failed login attempt
This commit is contained in:
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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user