mirror of
https://github.com/zadam/trilium.git
synced 2025-10-27 17:27:01 +08:00
Logout same error message on api 401 as on login error
This commit is contained in:
parent
bd35539fa1
commit
21504d1417
1 changed files with 1 additions and 0 deletions
|
|
@ -159,6 +159,7 @@ function checkCredentials(req: Request, res: Response, next: NextFunction) {
|
||||||
|
|
||||||
if (!passwordEncryptionService.verifyPassword(password)) {
|
if (!passwordEncryptionService.verifyPassword(password)) {
|
||||||
res.setHeader("Content-Type", "text/plain").status(401).send("Incorrect password");
|
res.setHeader("Content-Type", "text/plain").status(401).send("Incorrect password");
|
||||||
|
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue