Check for invalid certificate name.

Ylian Saint-Hilaire committed Jun 28, 2021 at 12:49 UTC 9b7dfff4b1a5a3bde672264e61b5be7dd0850f0d
1 file changed +3
meshcentral.js
+3
@@ -182,6 +182,9 @@ function CreateMeshCentralServer(config, args) {
182 return;
183 }
184
185 + // Check for invalid cert name
186 + if ((obj.args.cert != null) && ((typeof obj.args.cert != "string") || (obj.args.cert.indexOf('@') >= 0) || (obj.args.cert.indexOf('/') >= 0) || (obj.args.cert.indexOf(':') >= 0))) { console.log("Invalid certificate name"); process.exit(); return; }
187 +
188 // Perform a password hash
189 if (obj.args.hashpassword) { require('./pass').hash(obj.args.hashpassword, function (err, salt, hash, tag) { console.log(salt + ',' + hash); process.exit(); }); return; }
190