mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 23:13:21 -05:00
Added per-domain ignoreagenthashcheck.
This commit is contained in:
parent
e3bacf6764
commit
19e3d9e689
@ -387,7 +387,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||||||
if ((msg.length != 98) || ((obj.receivedCommands & 1) != 0)) return;
|
if ((msg.length != 98) || ((obj.receivedCommands & 1) != 0)) return;
|
||||||
obj.receivedCommands += 1; // Agent can't send the same command twice on the same connection ever. Block DOS attack path.
|
obj.receivedCommands += 1; // Agent can't send the same command twice on the same connection ever. Block DOS attack path.
|
||||||
|
|
||||||
if (args.ignoreagenthashcheck === true) {
|
if ((args.ignoreagenthashcheck === true) || (domain.ignoreagenthashcheck === true)) {
|
||||||
// Send the agent web hash back to the agent
|
// Send the agent web hash back to the agent
|
||||||
// Send 384 bits SHA384 hash of TLS cert + 384 bits nonce
|
// Send 384 bits SHA384 hash of TLS cert + 384 bits nonce
|
||||||
obj.sendBinary(common.ShortToStr(1) + msg.substring(2, 50) + obj.nonce); // Command 1, hash + nonce. Use the web hash given by the agent.
|
obj.sendBinary(common.ShortToStr(1) + msg.substring(2, 50) + obj.nonce); // Command 1, hash + nonce. Use the web hash given by the agent.
|
||||||
@ -1037,7 +1037,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||||||
|
|
||||||
// Verify the agent signature
|
// Verify the agent signature
|
||||||
function processAgentSignature(msg) {
|
function processAgentSignature(msg) {
|
||||||
if (args.ignoreagenthashcheck !== true) {
|
if ((args.ignoreagenthashcheck !== true) && (domain.ignoreagenthashcheck !== true)) {
|
||||||
var verified = false;
|
var verified = false;
|
||||||
|
|
||||||
if (msg.length != 384) {
|
if (msg.length != 384) {
|
||||||
|
Loading…
Reference in New Issue
Block a user