config.json read fixes.
Ylian Saint-Hilaire committed
Sep 11, 2023 at 09:50 UTC
62f52e91c700a8f5964e7d72c05f6203b116cd6d
3 files changed
+19
-12
meshcentral.js
+9
-9
@@ -4020,15 +4020,15 @@ function mainStart() {
4020
if (args.translate) { modules.push('jsdom'); modules.push('esprima'); modules.push('minify-js'); modules.push('html-minifier'); } // Translation support
4021
if (typeof config.settings.crowdsec == 'object') { modules.push('@crowdsec/express-bouncer'); } // Add CrowdSec bounser module (https://www.npmjs.com/package/@crowdsec/express-bouncer)
4022
4023
- // Setup encrypted zip support if needed
4024
- if (config.settings.autobackup && config.settings.autobackup.zippassword) {
4025
- modules.push('archiver-zip-encrypted');
4026
- }
4027
- // Enable Google Drive Support
4028
- if (typeof config.settings.autobackup.googledrive == 'object') { modules.push('googleapis'); }
4029
- // Enable WebDAV Support
4030
- if (typeof config.settings.autobackup.webdav == 'object') {
4031
- if ((typeof config.settings.autobackup.webdav.url != 'string') || (typeof config.settings.autobackup.webdav.username != 'string') || (typeof config.settings.autobackup.webdav.password != 'string')) { addServerWarning("Missing WebDAV parameters.", 2, null, !args.launch); } else { modules.push('webdav@4.11.3'); }
4023
+ if (typeof config.settings.autobackup == 'object') {
4024
+ // Setup encrypted zip support if needed
4025
+ if (config.settings.autobackup.zippassword) { modules.push('archiver-zip-encrypted'); }
4026
+ // Enable Google Drive Support
4027
+ if (typeof config.settings.autobackup.googledrive == 'object') { modules.push('googleapis'); }
4028
+ // Enable WebDAV Support
4029
+ if (typeof config.settings.autobackup.webdav == 'object') {
4030
+ if ((typeof config.settings.autobackup.webdav.url != 'string') || (typeof config.settings.autobackup.webdav.username != 'string') || (typeof config.settings.autobackup.webdav.password != 'string')) { addServerWarning("Missing WebDAV parameters.", 2, null, !args.launch); } else { modules.push('webdav@4.11.3'); }
4031
+ }
4032
}
4033
4034
// Setup common password blocking
meshmessaging.js
+1
-1
@@ -245,7 +245,7 @@ module.exports.CreateServer = function (parent) {
245
}
246
247
// Pushover client setup (https://pushover.net)
248
- if (parent.config.messaging.pushover) {
248
+ if (typeof parent.config.messaging.pushover == 'object') {
249
// Validate Pushover configuration values
250
var pushoverOK = true;
251
if (typeof parent.config.messaging.pushover.token != 'string') { console.log('Invalid or missing Pushover token.'); pushoverOK = false; }
package.json
+9
-2
@@ -37,6 +37,7 @@
37
"sample-config-advanced.json"
38
],
39
"dependencies": {
40
+ "@yetzt/nedb": "^1.8.0",
41
"archiver": "^5.3.2",
42
"body-parser": "^1.19.0",
43
"cbor": "~5.2.0",
@@ -46,13 +47,19 @@
47
"express-handlebars": "^5.3.5",
48
"express-ws": "^4.0.0",
49
"ipcheck": "^0.1.0",
50
+ "ldapauth-fork": "^5.0.5",
51
+ "loadavg-windows": "^1.1.1",
52
"minimist": "^1.2.5",
53
"multiparty": "^4.2.1",
51
- "@yetzt/nedb": "^1.8.0",
54
"node-forge": "^1.0.0",
55
+ "node-pushover": "^1.0.0",
56
+ "node-windows": "^0.1.14",
57
+ "otplib": "^10.2.3",
58
+ "ssh2": "^1.14.0",
59
"ua-parser-js": "^1.0.35",
60
"ws": "^5.2.3",
55
- "yauzl": "^2.10.0"
61
+ "yauzl": "^2.10.0",
62
+ "zulip": "^0.1.0"
63
},
64
"engines": {
65
"node": ">=10.0.0"