diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 528a6b91a..040a6f025 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -201,7 +201,7 @@ const errorIndex = (props)=>{ as so at our subreddit or discord you will find in the home page. `, - '53' : dedent` + '54' : dedent` ## You have runned out of attempts You have failed to provide correct credentials to access the page too many times, and you have run out of attempts. diff --git a/package-lock.json b/package-lock.json index f7be26f96..38134ae2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "express": "^4.19.2", "express-async-handler": "^1.2.0", "express-rate-limit": "^7.2.0", - "express-static-gzip": "2.1.7", + "express-static-gzip": "2.1.8", "fs-extra": "11.2.0", "js-yaml": "^4.1.0", "jwt-simple": "^0.5.6", diff --git a/server/admin.api.js b/server/admin.api.js index ca0f6155f..8090153b0 100644 --- a/server/admin.api.js +++ b/server/admin.api.js @@ -9,7 +9,7 @@ const rateLimit = require('express-rate-limit'); const loginLimiter = rateLimit({ timeWindow : 24 * 60 * 60 * 1000, // 24 hours window max : 10, // limit each IP to 10 requests per timeWindow - handler : ()=>{throw { HBErrorCode: '470', code: 470, message: 'Too many failed login attempts, try again later' }; } + handler : ()=>{throw { HBErrorCode: '54', code: 470, message: 'Too many failed login attempts, try again later' }; } }); //Local version username and password @@ -23,7 +23,7 @@ const mw = { if (!req.get('authorization')) { return res .set('WWW-Authenticate', 'Basic realm="Authorization Required"') - .status(401) + .status(51) .send('Authorization Required'); } const [username, password] = Buffer.from(req.get('authorization').split(' ').pop(), 'base64') @@ -32,7 +32,7 @@ const mw = { if (process.env.ADMIN_USER === username && process.env.ADMIN_PASS === password) { return next(); } - throw { HBErrorCode: '403', code: 401, message: 'Access denied' }; + throw { HBErrorCode: '53', code: 401, message: 'Access denied' }; } ] };