Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit fa350e1

Browse files
committed
fix(login): send back 401 Unauthorized on failed login attempt
1 parent 3a3f5be commit fa350e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function sendLoginError(req: Request, res: Response, errorType: 'password' | 'to
134134
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
135135
}
136136

137-
res.render('login', {
137+
res.status(401).render('login', {
138138
wrongPassword: errorType === 'password',
139139
wrongTotp: errorType === 'totp',
140140
totpEnabled: totp.isTotpEnabled(),

0 commit comments

Comments
 (0)