1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added SSH Key support.

This commit is contained in:
Ylian Saint-Hilaire 2021-08-12 22:52:42 -07:00
parent b07a682044
commit 6798415c92
5 changed files with 128 additions and 29 deletions

View file

@ -7072,10 +7072,10 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
obj.CloneSafeNode = function (node) {
if (typeof node != 'object') { return node; }
var r = node;
if ((r.pmt != null) || ((r.intelamt != null) && ((r.intelamt.pass != null) || (r.intelamt.mpspass != null)))) {
if ((r.pmt != null) || (r.ssh != null) || (r.rdp != null) || ((r.intelamt != null) && ((r.intelamt.pass != null) || (r.intelamt.mpspass != null)))) {
r = Object.assign({}, r); // Shallow clone
if (r.pmt != null) { r.pmt = 1; }
if (r.ssh != null) { r.ssh = 1; }
if (r.ssh != null) { r.ssh = (r.ssh.k != null) ? 2 : 1; }
if (r.rdp != null) { r.rdp = 1; }
if ((r.intelamt != null) && ((r.intelamt.pass != null) || (r.intelamt.mpspass != null))) {
r.intelamt = Object.assign({}, r.intelamt); // Shallow clone