mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-03 07:53:39 +00:00
make image smaller + allow long passwd + dep updates + fix compression/misspellings
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
@@ -1150,14 +1150,14 @@
|
||||
"current": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64,
|
||||
"example": "9KcvfmAvcVonB7YOMqdjJGsTG2JL058Rx6xFNMintAeaGETsRBRlSbfXdi1inoCa"
|
||||
"maxLength": 99,
|
||||
"example": "iArhP1j7p1P6TA92FA2FMbbUGYqwcYzxC4AVEe12Wbi94FY9gNN62aKyF1shrvG4NycjjX9KfmDQiwkLZH1ZDR9xMjiG2QmoHXi"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"minLength": 8,
|
||||
"maxLength": 64,
|
||||
"example": "mySuperN3wP@ssword!"
|
||||
"maxLength": 99,
|
||||
"example": "5wdvvveVKkNNr8K7fSQKoUWbYyCZ2abtLaa1J5LzAvMfkGVcGBXHQ32iuPdeKdNfQVZiPKee3ZPKaGMvFR5t94QCeZbK3faSVYu"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1251,4 +1251,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ const permsSchema = require('./access/permissions.json');
|
||||
module.exports = function (token_string) {
|
||||
let Token = new TokenModel();
|
||||
let token_data = null;
|
||||
let initialised = false;
|
||||
let initialized = false;
|
||||
let object_cache = {};
|
||||
let allow_internal_access = false;
|
||||
let user_roles = [];
|
||||
@@ -34,7 +34,7 @@ module.exports = function (token_string) {
|
||||
*/
|
||||
this.init = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (initialised) {
|
||||
if (initialized) {
|
||||
resolve();
|
||||
} else if (!token_string) {
|
||||
reject(new error.PermissionError('Permission Denied'));
|
||||
@@ -74,7 +74,7 @@ module.exports = function (token_string) {
|
||||
if (!is_ok) {
|
||||
throw new error.AuthError('Invalid token scope for User');
|
||||
} else {
|
||||
initialised = true;
|
||||
initialized = true;
|
||||
user_roles = user.roles;
|
||||
permissions = user.permissions;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ module.exports = function (token_string) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
initialised = true;
|
||||
initialized = true;
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -248,7 +248,7 @@ module.exports = function (token_string) {
|
||||
} else {
|
||||
return this.init()
|
||||
.then(() => {
|
||||
// Initialised, token decoded ok
|
||||
// initialized, token decoded ok
|
||||
return this.getObjectSchema(permission)
|
||||
.then((objectSchema) => {
|
||||
let data_schema = {
|
||||
|
@@ -4,12 +4,12 @@
|
||||
"description": "A beautiful interface for creating Nginx endpoints",
|
||||
"main": "js/index.js",
|
||||
"dependencies": {
|
||||
"@apidevtools/json-schema-ref-parser": "10.0.1",
|
||||
"@apidevtools/json-schema-ref-parser": "10.1.0",
|
||||
"ajv": "6.12.6",
|
||||
"archiver": "5.3.1",
|
||||
"batchflow": "0.4.0",
|
||||
"bcrypt": "5.1.0",
|
||||
"body-parser": "1.20.1",
|
||||
"body-parser": "1.20.2",
|
||||
"compression": "1.7.4",
|
||||
"config": "3.3.9",
|
||||
"express": "4.18.2",
|
||||
|
@@ -172,7 +172,7 @@
|
||||
"description": "Domain Names separated by a comma",
|
||||
"example": "*.jc21.com,blog.jc21.com",
|
||||
"type": "array",
|
||||
"maxItems": 64,
|
||||
"maxItems": 99,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
|
@@ -194,12 +194,12 @@
|
||||
"current": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
"maxLength": 99
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"minLength": 8,
|
||||
"maxLength": 64
|
||||
"maxLength": 99
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -80,7 +80,7 @@ const setupDefaultUser = () => {
|
||||
.then((row) => {
|
||||
if (!row.count) {
|
||||
// Create a new user and set password
|
||||
logger.info('Creating a new user: admin@example.com with password: 9KcvfmAvcVonB7YOMqdjJGsTG2JL058Rx6xFNMintAeaGETsRBRlSbfXdi1inoCa');
|
||||
logger.info('Creating a new user: admin@example.com with password: iArhP1j7p1P6TA92FA2FMbbUGYqwcYzxC4AVEe12Wbi94FY9gNN62aKyF1shrvG4NycjjX9KfmDQiwkLZH1ZDR9xMjiG2QmoHXi');
|
||||
|
||||
let data = {
|
||||
is_deleted: 0,
|
||||
@@ -100,7 +100,7 @@ const setupDefaultUser = () => {
|
||||
.insert({
|
||||
user_id: user.id,
|
||||
type: 'password',
|
||||
secret: '9KcvfmAvcVonB7YOMqdjJGsTG2JL058Rx6xFNMintAeaGETsRBRlSbfXdi1inoCa',
|
||||
secret: 'iArhP1j7p1P6TA92FA2FMbbUGYqwcYzxC4AVEe12Wbi94FY9gNN62aKyF1shrvG4NycjjX9KfmDQiwkLZH1ZDR9xMjiG2QmoHXi',
|
||||
meta: {},
|
||||
})
|
||||
.then(() => {
|
||||
|
Reference in New Issue
Block a user