Logout same error message on api 401 as on login error

This commit is contained in:
hulmgulm
2025-08-25 21:18:01 +02:00
parent bd35539fa1
commit 21504d1417

View File

@@ -159,6 +159,7 @@ function checkCredentials(req: Request, res: Response, next: NextFunction) {
if (!passwordEncryptionService.verifyPassword(password)) {
res.setHeader("Content-Type", "text/plain").status(401).send("Incorrect password");
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
} else {
next();
}