From 836ad768acc42d3142fbd8eeb6016be02ca37bea Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sun, 23 Jan 2022 23:21:24 -0800 Subject: [PATCH] Updated headers. --- amt-ider.js | 2 +- amtevents.js | 2 +- amtmanager.js | 2 +- amtprovisioningserver.js | 2 +- amtscanner.js | 2 +- amtscript.js | 2 +- apprelays.js | 2 +- certoperations.js | 2 +- common.js | 2 +- db.js | 2 +- exeHandler.js | 2 +- firebase.js | 2 +- interceptor.js | 2 +- letsencrypt.js | 2 +- mcrec.js | 2 +- meshaccelerator.js | 2 +- meshagent.js | 2 +- meshbot.js | 2 +- meshcentral.js | 2 +- meshctrl.js | 8 ++++++++ meshdesktopmultiplex.js | 2 +- meshdevicefile.js | 2 +- meshipkvm.js | 2 +- meshmail.js | 2 +- meshrelay.js | 2 +- meshscanner.js | 2 +- meshsms.js | 2 +- meshuser.js | 4 ++-- mpsserver.js | 2 +- mqttbroker.js | 2 +- multiserver.js | 2 +- redirserver.js | 2 +- swarmserver.js | 2 +- webserver.js | 2 +- winservice.js | 2 +- 35 files changed, 43 insertions(+), 35 deletions(-) diff --git a/amt-ider.js b/amt-ider.js index 1e8bc464..6d7d4934 100644 --- a/amt-ider.js +++ b/amt-ider.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Server IDER handler * @author Ylian Saint-Hilaire & Bryan Roe -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/amtevents.js b/amtevents.js index 18c1608a..443c2f8e 100644 --- a/amtevents.js +++ b/amtevents.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Intel(R) AMT Event Parser * @author Ylian Saint-Hilaire & Bryan Roe -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/amtmanager.js b/amtmanager.js index c6769bdb..53cdb4b6 100644 --- a/amtmanager.js +++ b/amtmanager.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Intel AMT manager * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/amtprovisioningserver.js b/amtprovisioningserver.js index cfc7a1f7..1486db4d 100644 --- a/amtprovisioningserver.js +++ b/amtprovisioningserver.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Intel AMT Hello server * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/amtscanner.js b/amtscanner.js index 688cd52d..941aef7e 100644 --- a/amtscanner.js +++ b/amtscanner.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Intel(R) AMT Local Scanner * @author Ylian Saint-Hilaire & Joko Sastriawan -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/amtscript.js b/amtscript.js index ec65b333..0d07f79c 100644 --- a/amtscript.js +++ b/amtscript.js @@ -1,7 +1,7 @@ /** * @fileoverview Script Compiler / Decompiler / Runner * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.1.0e */ diff --git a/apprelays.js b/apprelays.js index b8a45e16..3e203f9c 100644 --- a/apprelays.js +++ b/apprelays.js @@ -1,7 +1,7 @@ /** * @description MeshCentral MSTSC & SSH relay * @author Ylian Saint-Hilaire & Bryan Roe -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/certoperations.js b/certoperations.js index 037f1402..0d837d82 100644 --- a/certoperations.js +++ b/certoperations.js @@ -1,7 +1,7 @@ /** * @description Certificate generator * @author Joko Sastriawan / Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/common.js b/common.js index 40fd128e..7db0da7c 100644 --- a/common.js +++ b/common.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Common Library * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/db.js b/db.js index e980aa62..4e7d1e0d 100644 --- a/db.js +++ b/db.js @@ -1,7 +1,7 @@ /** * @description MeshCentral database module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.2 */ diff --git a/exeHandler.js b/exeHandler.js index 42e14bcc..5b7b18e8 100644 --- a/exeHandler.js +++ b/exeHandler.js @@ -1,5 +1,5 @@ /* -Copyright 2018-2021 Intel Corporation +Copyright 2018-2022 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/firebase.js b/firebase.js index 5e4643ac..d20a9541 100644 --- a/firebase.js +++ b/firebase.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Firebase communication module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/interceptor.js b/interceptor.js index 48d7f7dc..7585620e 100644 --- a/interceptor.js +++ b/interceptor.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Intel(R) AMT Interceptor * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.3 */ diff --git a/letsencrypt.js b/letsencrypt.js index a4a8c826..c83cf102 100644 --- a/letsencrypt.js +++ b/letsencrypt.js @@ -1,7 +1,7 @@ /** * @description MeshCentral letsEncrypt module, uses ACME-Client to do all the work. * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.2 */ diff --git a/mcrec.js b/mcrec.js index d835567c..565062a9 100644 --- a/mcrec.js +++ b/mcrec.js @@ -1,7 +1,7 @@ /** * @description MeshCentral MeshAgent * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2019-2021 +* @copyright Intel Corporation 2019-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshaccelerator.js b/meshaccelerator.js index aed9b448..c492f92b 100644 --- a/meshaccelerator.js +++ b/meshaccelerator.js @@ -1,7 +1,7 @@ /** * @description MeshCentral accelerator * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshagent.js b/meshagent.js index c708f635..6bad4b1e 100644 --- a/meshagent.js +++ b/meshagent.js @@ -1,7 +1,7 @@ /** * @description MeshCentral MeshAgent communication module * @author Ylian Saint-Hilaire & Bryan Roe -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshbot.js b/meshbot.js index 3c6ff4c9..5ff0de9b 100644 --- a/meshbot.js +++ b/meshbot.js @@ -3,7 +3,7 @@ /** * @description MeshCentral bot sample code * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshcentral.js b/meshcentral.js index fb22013f..0b4be812 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -1,7 +1,7 @@ /** * @description MeshCentral main module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshctrl.js b/meshctrl.js index 01c341b1..c4a5c14a 100644 --- a/meshctrl.js +++ b/meshctrl.js @@ -1,5 +1,13 @@ #!/usr/bin/env node +/** +* @description MeshCentral command line tool +* @author Ylian Saint-Hilaire +* @copyright Intel Corporation 2018-2022 +* @license Apache-2.0 +* @version v0.0.1 +*/ + // Make sure we have the dependency modules try { require('minimist'); } catch (ex) { console.log('Missing module "minimist", type "npm install minimist" to install it.'); return; } try { require('ws'); } catch (ex) { console.log('Missing module "ws", type "npm install ws" to install it.'); return; } diff --git a/meshdesktopmultiplex.js b/meshdesktopmultiplex.js index 02b17aa9..7ea33d67 100644 --- a/meshdesktopmultiplex.js +++ b/meshdesktopmultiplex.js @@ -1,7 +1,7 @@ /** * @description MeshCentral remote desktop multiplexor * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshdevicefile.js b/meshdevicefile.js index c3b71531..695a0f65 100644 --- a/meshdevicefile.js +++ b/meshdevicefile.js @@ -1,7 +1,7 @@ /** * @description MeshCentral device file download relay module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshipkvm.js b/meshipkvm.js index 8a4129ca..a471554a 100644 --- a/meshipkvm.js +++ b/meshipkvm.js @@ -1,7 +1,7 @@ /** * @description MeshCentral IP KVM Management Module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2021 +* @copyright Intel Corporation 2021-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshmail.js b/meshmail.js index 5a6b08c7..f9f135f0 100644 --- a/meshmail.js +++ b/meshmail.js @@ -1,7 +1,7 @@ /** * @description MeshCentral e-mail server communication modules * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshrelay.js b/meshrelay.js index 611edbb2..d14cdde3 100644 --- a/meshrelay.js +++ b/meshrelay.js @@ -1,7 +1,7 @@ /** * @description MeshCentral connection relay module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshscanner.js b/meshscanner.js index ba9e9ad5..6eda8192 100644 --- a/meshscanner.js +++ b/meshscanner.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Mesh Agent Local Scanner * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshsms.js b/meshsms.js index 8de5eeb1..e2b2b7ce 100644 --- a/meshsms.js +++ b/meshsms.js @@ -1,7 +1,7 @@ /** * @description MeshCentral SMS gateway communication module * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/meshuser.js b/meshuser.js index 5cbcf339..df70f1ea 100644 --- a/meshuser.js +++ b/meshuser.js @@ -1,7 +1,7 @@ /** * @description MeshCentral MeshAgent * @author Ylian Saint-Hilaire & Bryan Roe -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ @@ -5108,7 +5108,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Add a new user account var err = null, errid = 0, newusername, newuserid, newuserdomain; try { - if ((user.siteadmin & 2) == 0) { err = "Permission denied"; errid = 1; } + if ((user.siteadmin & MESHRIGHT_MANAGEUSERS) == 0) { err = "Permission denied"; errid = 1; } else if (common.validateUsername(command.username, 1, 256) == false) { err = "Invalid username"; errid = 2; } // Username is between 1 and 64 characters, no spaces else if ((command.username[0] == '~') || (command.username.indexOf('/') >= 0)) { err = "Invalid username"; errid = 2; } // Usernames cant' start with ~ and can't have '/' else if (common.validateString(command.pass, 1, 256) == false) { err = "Invalid password"; errid = 3; } // Password is between 1 and 256 characters diff --git a/mpsserver.js b/mpsserver.js index 5dc9b844..56764775 100644 --- a/mpsserver.js +++ b/mpsserver.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Intel(R) AMT MPS server * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/mqttbroker.js b/mqttbroker.js index c17dbdc4..58d92473 100644 --- a/mqttbroker.js +++ b/mqttbroker.js @@ -1,7 +1,7 @@ /** * @description MQTT broker reference implementation based on AEDES * @author Joko Banu Sastriawan, Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/multiserver.js b/multiserver.js index bdcaa5e7..2a1aa9c6 100644 --- a/multiserver.js +++ b/multiserver.js @@ -1,7 +1,7 @@ /** * @description MeshCentral Multi-Server Support * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/redirserver.js b/redirserver.js index 1d82f051..aadbcd96 100644 --- a/redirserver.js +++ b/redirserver.js @@ -1,7 +1,7 @@ /** * @description Meshcentral web server * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.2 */ diff --git a/swarmserver.js b/swarmserver.js index 3d8c5820..4bd1ae07 100644 --- a/swarmserver.js +++ b/swarmserver.js @@ -1,7 +1,7 @@ /** * @description MeshCentral v1 legacy Swarm Server, used to update agents and get them on MeshCentral2 * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/webserver.js b/webserver.js index 57297b16..410c6280 100644 --- a/webserver.js +++ b/webserver.js @@ -1,7 +1,7 @@ /** * @description MeshCentral web server * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */ diff --git a/winservice.js b/winservice.js index 2b41f558..cafd7ba8 100644 --- a/winservice.js +++ b/winservice.js @@ -1,7 +1,7 @@ /** * @description Windows Service Launcher * @author Ylian Saint-Hilaire -* @copyright Intel Corporation 2018-2021 +* @copyright Intel Corporation 2018-2022 * @license Apache-2.0 * @version v0.0.1 */