Skip to content

Commit 8c4862e

Browse files
authored
Merge branch 'Ylianst:master' into master
2 parents b08b769 + 63092f1 commit 8c4862e

11 files changed

Lines changed: 6630 additions & 169 deletions

File tree

db.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ module.exports.CreateDB = function (parent, func) {
950950
});
951951
} else { // If not present, create the tables and indexes
952952
//not needed, just use a create db statement: const pgtools = require('pgtools');
953-
DatastoreTest.query('CREATE DATABASE '+ databaseName + ';', [], function (err, res) {
953+
DatastoreTest.query('CREATE DATABASE "'+ databaseName + '";', [], function (err, res) {
954954
if (err == null) {
955955
// Create the tables and indexes
956956
DatastoreTest.end();
@@ -3420,8 +3420,8 @@ module.exports.CreateDB = function (parent, func) {
34203420
// Check that we have access to pg_dump
34213421
parent.config.settings.autobackup.pgdumppath = path.normalize(parent.config.settings.autobackup.pgdumppath ? parent.config.settings.autobackup.pgdumppath : 'pg_dump');
34223422
let cmd = '"' + parent.config.settings.autobackup.pgdumppath + '"'
3423-
+ ' --dbname=postgresql://' + parent.config.settings.postgres.user + ":" +parent.config.settings.postgres.password
3424-
+ "@" + parent.config.settings.postgres.host + ":" + parent.config.settings.postgres.port + "/" + databaseName
3423+
+ ' --dbname=postgresql://' + encodeURIComponent(parent.config.settings.postgres.user) + ":" + encodeURIComponent(parent.config.settings.postgres.password)
3424+
+ "@" + parent.config.settings.postgres.host + ":" + parent.config.settings.postgres.port + "/" + encodeURIComponent(databaseName)
34253425
+ ' > ' + ((parent.platform == 'win32') ? '\"nul\"' : '\"/dev/null\"');
34263426
const child_process = require('child_process');
34273427
child_process.exec(cmd, { cwd: backupPath }, function(error, stdout, stdin) {
@@ -3614,11 +3614,11 @@ module.exports.CreateDB = function (parent, func) {
36143614
});
36153615
} else if (obj.databaseType == DB_POSTGRESQL) {
36163616
// Perform a PostgresDump backup
3617-
const newBackupFile = databaseName + '-pgdump-' + fileSuffix + '.sql';
3617+
const newBackupFile = 'pgdump-' + fileSuffix + '.sql';
36183618
obj.newDBDumpFile = path.join(backupPath, newBackupFile);
36193619
let cmd = '"' + parent.config.settings.autobackup.pgdumppath + '"'
3620-
+ ' --dbname=postgresql://' + parent.config.settings.postgres.user + ":" +parent.config.settings.postgres.password
3621-
+ "@" + parent.config.settings.postgres.host + ":" + parent.config.settings.postgres.port + "/" + databaseName
3620+
+ ' --dbname=postgresql://' + encodeURIComponent(parent.config.settings.postgres.user) + ":" + encodeURIComponent(parent.config.settings.postgres.password)
3621+
+ "@" + parent.config.settings.postgres.host + ":" + parent.config.settings.postgres.port + "/" + encodeURIComponent(databaseName)
36223622
+ " --file=" + obj.newDBDumpFile;
36233623
parent.debug('backup','Postgresqldump cmd: ' + cmd);
36243624
const child_process = require('child_process');

dependencies.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"@seald-io/nedb": "4.0.4",
1+
"@seald-io/nedb": "4.1.2",
22
"archiver": "7.0.1",
33
"body-parser": "1.20.3",
44
"cbor": "5.2.0",
@@ -11,7 +11,8 @@
1111
"minimist": "1.2.8",
1212
"multiparty": "4.2.3",
1313
"node-forge": "1.3.1",
14+
"otplib": "12.0.1",
1415
"ua-client-hints-js": "0.1.2",
1516
"ua-parser-js": "1.0.40",
16-
"ws": "8.18.0",
17+
"ws": "8.18.3",
1718
"yauzl": "2.10.0"

meshcentral.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4325,7 +4325,7 @@ function mainStart() {
43254325

43264326
// Build the list of required modules
43274327
// NOTE: ALL MODULES MUST HAVE A VERSION NUMBER AND THE VERSION MUST MATCH THAT USED IN Dockerfile
4328-
var modules = ['archiver@7.0.1', 'body-parser@1.20.3', 'cbor@5.2.0', 'compression@1.8.1', 'cookie-session@2.1.1', 'express@4.21.2', 'express-handlebars@7.1.3', 'express-ws@5.0.2', 'ipcheck@0.1.0', 'minimist@1.2.8', 'multiparty@4.2.3', '@seald-io/nedb', 'node-forge@1.3.1', 'ua-parser-js@1.0.40', 'ua-client-hints-js@0.1.2', 'ws@8.18.0', 'yauzl@2.10.0'];
4328+
var modules = ['archiver@7.0.1', 'body-parser@1.20.3', 'cbor@5.2.0', 'compression@1.8.1', 'cookie-session@2.1.1', 'express@4.21.2', 'express-handlebars@7.1.3', 'express-ws@5.0.2', 'ipcheck@0.1.0', 'minimist@1.2.8', 'multiparty@4.2.3', '@seald-io/nedb@4.1.2', 'node-forge@1.3.1', 'ua-parser-js@1.0.40', 'ua-client-hints-js@0.1.2', 'ws@8.18.3', 'yauzl@2.10.0'];
43294329
if (require('os').platform() == 'win32') { modules.push('node-windows@0.1.14'); modules.push('loadavg-windows@1.1.1'); if (sspi == true) { modules.push('node-sspi@0.2.10'); } } // Add Windows modules
43304330
if (ldap == true) { modules.push('ldapauth-fork@5.0.5'); }
43314331
if (ssh == true) { modules.push('ssh2@1.16.0'); }

0 commit comments

Comments
 (0)