From 352b5d4d6474deffc0cafed377eb88b7d0c04ea9 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sun, 24 Sep 2023 13:31:08 -0700 Subject: [PATCH] Improved server peering auth debug message. --- multiserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiserver.js b/multiserver.js index 2a1aa9c6..e6443797 100644 --- a/multiserver.js +++ b/multiserver.js @@ -101,7 +101,7 @@ module.exports.CreateMultiServer = function (parent, args) { switch (cmd) { case 1: { // Server authentication request - if (msg.length != 98) { obj.parent.parent.debug('peer', 'OutPeer: BAD MESSAGE(A1)'); return; } + if (msg.length != 98) { obj.parent.parent.debug('peer', 'OutPeer: Bad server authentication message, length = ' + msg.length + ', should be 98. HEX: ' + Buffer.from(msg.substring(0, 4096), 'binary').toString('hex')); return; } // Check that the server hash matches the TLS server certificate public key hash if (obj.url.toLowerCase().startsWith('wss://') && (obj.serverCertHash != msg.substring(2, 50))) { obj.parent.parent.debug('peer', 'OutPeer: Server hash mismatch.'); disconnect(); return; }