mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Added check that backup path is not in meshcentral-data folder, #3266
This commit is contained in:
parent
6297a2ef53
commit
3a42b84315
2 changed files with 8 additions and 1 deletions
|
@ -1747,6 +1747,12 @@ function CreateMeshCentralServer(config, args) {
|
||||||
if (obj.config.settings.autobackup == null) { obj.config.settings.autobackup = { backupintervalhours: 24, keeplastdaysbackup: 10 }; }
|
if (obj.config.settings.autobackup == null) { obj.config.settings.autobackup = { backupintervalhours: 24, keeplastdaysbackup: 10 }; }
|
||||||
else if (obj.config.settings.autobackup === false) { delete obj.config.settings.autobackup; }
|
else if (obj.config.settings.autobackup === false) { delete obj.config.settings.autobackup; }
|
||||||
|
|
||||||
|
// Check that autobackup path is not within the "meshcentral-data" folder.
|
||||||
|
if ((typeof obj.config.settings.autobackup.backuppath == 'string') && (obj.path.normalize(obj.config.settings.autobackup.backuppath).startsWith(obj.path.normalize(obj.datapath)))) {
|
||||||
|
addServerWarning("Backup path can't be set within meshcentral-data folder, backup settings ignored.", 21);
|
||||||
|
delete obj.config.settings.autobackup;
|
||||||
|
}
|
||||||
|
|
||||||
// Load Intel AMT passwords from the "amtactivation.log" file
|
// Load Intel AMT passwords from the "amtactivation.log" file
|
||||||
obj.loadAmtActivationLogPasswords(function (amtPasswords) {
|
obj.loadAmtActivationLogPasswords(function (amtPasswords) {
|
||||||
obj.amtPasswords = amtPasswords;
|
obj.amtPasswords = amtPasswords;
|
||||||
|
|
|
@ -2219,7 +2219,8 @@
|
||||||
17: "SendGrid server has limited use in LAN mode.",
|
17: "SendGrid server has limited use in LAN mode.",
|
||||||
18: "SMTP server has limited use in LAN mode.",
|
18: "SMTP server has limited use in LAN mode.",
|
||||||
19: "SMS gateway has limited use in LAN mode.",
|
19: "SMS gateway has limited use in LAN mode.",
|
||||||
20: "Invalid \"LoginCookieEncryptionKey\" in config.json."
|
20: "Invalid \"LoginCookieEncryptionKey\" in config.json.",
|
||||||
|
21: "Backup path can't be set within meshcentral-data folder, backup settings ignored."
|
||||||
};
|
};
|
||||||
var x = '';
|
var x = '';
|
||||||
for (var i in message.warnings) {
|
for (var i in message.warnings) {
|
||||||
|
|
Loading…
Reference in a new issue