Skip to content

Commit 9373d47

Browse files
authored
fix: log same error message on api 401 as on login error to allow fail2ban blocking (#6782)
2 parents 83d1a68 + 2935062 commit 9373d47

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/server/src/services/auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ function checkCredentials(req: Request, res: Response, next: NextFunction) {
159159

160160
if (!passwordEncryptionService.verifyPassword(password)) {
161161
res.setHeader("Content-Type", "text/plain").status(401).send("Incorrect password");
162+
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
162163
} else {
163164
next();
164165
}

0 commit comments

Comments
 (0)