wrong password login screen should return 401 so that it counts to the rate limiter, fixes #3867

This commit is contained in:
zadam 2023-04-23 22:22:05 +02:00
parent e24d5a6f83
commit eff567ee48
2 changed files with 3 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "trilium", "name": "trilium",
"version": "0.59.3", "version": "0.59.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "trilium", "name": "trilium",
"version": "0.59.3", "version": "0.59.4",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"dependencies": { "dependencies": {

View File

@ -76,7 +76,7 @@ function login(req, res) {
// note that logged IP address is usually meaningless since the traffic should come from a reverse proxy // note that logged IP address is usually meaningless since the traffic should come from a reverse proxy
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`); log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
res.render('login', { res.status(401).render('login', {
failedAuth: true, failedAuth: true,
assetPath: assetPath assetPath: assetPath
}); });