diff --git a/agents/meshcore.js b/agents/meshcore.js index 6f5b0538..cf836b5c 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1148,7 +1148,9 @@ function createMeshCore(agent) { if (data.pipe == true) { delete data.pipe; delete data.action; data.cmd = 'meshToolInfo'; broadcastToRegisteredApps(data); } break; case 'wget': // Server uses this command to tell the agent to download a file using HTTPS/GET and place it in a given path. This is used for one-to-many file uploads. + sendConsoleText(JSON.stringify(data)); if ((data.overwrite !== true) && fs.existsSync(data.path)) break; // Don't overwrite an existing file. + if (data.createFolder) { try { fs.mkdirSync(data.folder); } catch (ex) { } } // If requested, create the local folder. data.url = 'http' + getServerTargetUrlEx('*/').substring(2); var agentFileHttpOptions = http.parseUri(data.url); agentFileHttpOptions.path = data.urlpath; diff --git a/translate/translate.json b/translate/translate.json index 29c286ac..a49c1dcf 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -190,7 +190,7 @@ { "cs": " Je možné zadat i nápovědu pro heslo, ale nedoporučuje se to.", "de": " Passwort-Hinweis kann verwendet werden, wird jedoch nicht empfohlen.", - "en": " Password hint can be used but is not recommanded.", + "en": " Password hint can be used but is not recommended.", "es": "La sugerencia de contraseña se puede usar pero no se recomienda.", "fi": " Salasanavihjeitä voidaan käyttää, mutta niitä ei suositella.", "fr": " Un indice de mot de passe peut être utilisé mais n'est pas recommandé.", @@ -35687,7 +35687,7 @@ "zh-cht": "這是不安全政策,因為將用代理執行啟動。" }, { - "en": "This is the recommanded policy. Intel® AMT activation and management is completely automated and the server will attempt to make best possible use of hardware management.", + "en": "This is the recommended policy. Intel® AMT activation and management is completely automated and the server will attempt to make best possible use of hardware management.", "nl": "Dit is het aanbevolen beleid. Activering en beheer van Intel® AMT is volledig geautomatiseerd en de server zal proberen om optimaal gebruik te maken van hardwarebeheer.", "xloc": [ "default.handlebars->29->1400" diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 21b22bca..8d98fd0a 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -1963,7 +1963,7 @@ var p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; function p5copyFile(cut) { var checkboxes = document.getElementsByName('fc'); p5clipboard = []; p5clipboardCut = cut, p5clipboardFolder = Clone(filetreelocation); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '3')) { p5clipboard.push(checkboxes[i].value); } } p5updateClipview(); } - function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Confim {0} of {1} entrie{2} to this location?", (p5clipboardCut == 0 ? 'copy' : 'move'), p5clipboard.length, ((p5clipboard.length > 1) ? 's' : '')) } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); } + function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Confirm {0} of {1} entrie{2} to this location?", (p5clipboardCut == 0 ? 'copy' : 'move'), p5clipboard.length, ((p5clipboard.length > 1) ? 's' : '')) } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); } function p5pasteFileEx() { meshserver.send({ action: 'fileoperation', fileop: (p5clipboardCut == 0 ? 'copy' : 'move'), scpath: p5clipboardFolder, path: filetreelocation, names: p5clipboard }); p5folderup(999); if (p5clipboardCut == 1) { p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; p5updateClipview(); } } function p5updateClipview() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Holding {0} entrie{1} for {2}", p5clipboard.length, ((p5clipboard.length > 1) ? 's' : ''), (p5clipboardCut == 0 ? "copy" : "move")) + ', ' + "Clear" + '.' } QH('p5bottomstatus', x); p5setActions(); } function p5clearClip() { p5clipboard = null; p5clipboardFolder = null; p5clipboardCut = 0; p5updateClipview(); return false; } diff --git a/views/default.handlebars b/views/default.handlebars index bd3934fd..505c0c0f 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -4530,7 +4530,8 @@ x += '

'; if (wintype) { x += addHtmlValue("Windows Path", ''); } if (linuxtype) { x += addHtmlValue("Linux Path", ''); } - x += '
'; + x += '
'; + x += ''; setDialogMode(2, "Batch File Upload", 3, d2batchUploadValidateOk, x); d2batchUploadValidate(); } else { @@ -9260,7 +9261,7 @@ function account_showChangePassword() { if (xxdialogMode) return false; var x = "Change your account password by entering the old password and new password twice in the boxes below."; - if (features & 0x00010000) { " Password hint can be used but is not recommanded."; } + if (features & 0x00010000) { " Password hint can be used but is not recommended."; } x += '

'; //x += "
"; x += ''; @@ -9713,7 +9714,7 @@ } if (ptype == 0) { x = '
' + "When this policy is selected, Intel® AMT is not managed by this server. Intel AMT can still be used by manually activating and configuring it." + '
'; } if (ptype == 1) { x = '
' + "When this policy is selected, any Intel® AMT in Client Control Mode (CCM) will be deactivated. Other devices will have CIRA cleared and can still be managed manually." + '
'; } - if (ptype == 4) { x = '
' + "This is the recommanded policy. Intel® AMT activation and management is completely automated and the server will attempt to make best possible use of hardware management." + '
'; } + if (ptype == 4) { x = '
' + "This is the recommended policy. Intel® AMT activation and management is completely automated and the server will attempt to make best possible use of hardware management." + '
'; } QH('dp20amtpolicydiv', x); setTimeout(dp20amtValidatePolicy, 500); } @@ -10720,7 +10721,7 @@ } p5updateClipview(); } - function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Confim {0} of {1} entrie{2} to this location?", (p5clipboardCut == 0?'copy':'move'), p5clipboard.length, ((p5clipboard.length > 1)?'s':'')) } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); } + function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Confirm {0} of {1} entrie{2} to this location?", (p5clipboardCut == 0?'copy':'move'), p5clipboard.length, ((p5clipboard.length > 1)?'s':'')) } setDialogMode(2, "Paste", 3, p5pasteFileEx, x); } function p5pasteFileEx() { meshserver.send({ action: 'fileoperation', fileop: (p5clipboardCut == 0?'copy':'move'), scpath: p5clipboardFolder, path: filetreelocation, names: p5clipboard }); p5folderup(999); if (p5clipboardCut == 1) { p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; p5updateClipview(); } } function p5updateClipview() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Holding {0} entrie{1} for {2}", p5clipboard.length, ((p5clipboard.length > 1)?'s':''), (p5clipboardCut == 0?"copy":"move")) + ', ' + "Clear" + '.' } QH('p5bottomstatus', x); p5setActions(); } function p5clearClip() { p5clipboard = null; p5clipboardFolder = null; p5clipboardCut = 0; p5updateClipview(); return false; } diff --git a/webserver.js b/webserver.js index 129288f3..f558debd 100644 --- a/webserver.js +++ b/webserver.js @@ -3196,6 +3196,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { if ((fields.winpath != null) && (fields.winpath.length == 1)) { cmd.windowsPath = fields.winpath[0]; } if ((fields.linuxpath != null) && (fields.linuxpath.length == 1)) { cmd.linuxPath = fields.linuxpath[0]; } if ((fields.overwriteFiles != null) && (fields.overwriteFiles.length == 1) && (fields.overwriteFiles[0] == 'on')) { cmd.overwrite = true; } + if ((fields.createFolder != null) && (fields.createFolder.length == 1) && (fields.createFolder[0] == 'on')) { cmd.createFolder = true; } // Get server temporary path var serverpath = obj.path.join(obj.filespath, 'tmp') @@ -3230,7 +3231,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { if ((node == null) || ((rights & 8) == 0) || (visible == false)) return; // We don't have remote control rights to this device var agentPath = ((node.agent.id > 0) && (node.agent.id < 5)) ? cmd.windowsPath : cmd.linuxPath; for (var f in cmd.files) { - const acmd = { action: 'wget', overwrite: cmd.overwrite, urlpath: '/agentdownload.ashx?c=' + obj.parent.encodeCookie({ a: 'tmpdl', d: cmd.domain.id, nid: node._id, f: cmd.files[f].target }, obj.parent.loginCookieEncryptionKey), path: obj.path.join(agentPath, cmd.files[f].name), servertlshash: tlsCertHash }; + const acmd = { action: 'wget', overwrite: cmd.overwrite, createFolder: cmd.createFolder, urlpath: '/agentdownload.ashx?c=' + obj.parent.encodeCookie({ a: 'tmpdl', d: cmd.domain.id, nid: node._id, f: cmd.files[f].target }, obj.parent.loginCookieEncryptionKey), path: obj.path.join(agentPath, cmd.files[f].name), folder: agentPath, servertlshash: tlsCertHash }; var agent = obj.wsagents[node._id]; if (agent != null) { try { agent.send(JSON.stringify(acmd)); } catch (ex) { } } // TODO: Add support for peer servers.