Improved server peering auth debug message.
Ylian Saint-Hilaire committed
Sep 24, 2023 at 13:31 UTC
352b5d4d6474deffc0cafed377eb88b7d0c04ea9
1 file changed
+1
-1
multiserver.js
+1
-1
@@ -101,7 +101,7 @@ module.exports.CreateMultiServer = function (parent, args) {
101
switch (cmd) {
102
case 1: {
103
// Server authentication request
104
- if (msg.length != 98) { obj.parent.parent.debug('peer', 'OutPeer: BAD MESSAGE(A1)'); return; }
104
+ 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; }
105
106
// Check that the server hash matches the TLS server certificate public key hash
107
if (obj.url.toLowerCase().startsWith('wss://') && (obj.serverCertHash != msg.substring(2, 50))) { obj.parent.parent.debug('peer', 'OutPeer: Server hash mismatch.'); disconnect(); return; }