diff --git a/src/services/service.ts b/src/services/service.ts index a4ff8ab..8ac317b 100755 --- a/src/services/service.ts +++ b/src/services/service.ts @@ -2116,7 +2116,7 @@ export default class Services { spAddressType: typeof handshakeMsg.sp_address, spAddressLength: handshakeMsg.sp_address?.length }); - + if (handshakeMsg.sp_address) { this.updateRelay(url, handshakeMsg.sp_address); this.relayAddresses[url] = handshakeMsg.sp_address; diff --git a/src/websockets.ts b/src/websockets.ts index bb73816..95991d8 100755 --- a/src/websockets.ts +++ b/src/websockets.ts @@ -28,9 +28,15 @@ export async function initWebsocket(url: string) { if (typeof msgData === 'string') { try { // Valider le message avant traitement + console.log('🔍 DEBUG: Raw WebSocket message:', msgData); const validation = messageValidator.validateWebSocketMessage(msgData); + console.log('🔍 DEBUG: Validation result:', validation); if (!validation.isValid) { + console.warn('⚠️ Invalid WebSocket message received:', { + errors: validation.errors, + messagePreview: msgData.substring(0, 100) + }); secureLogger.warn('Invalid WebSocket message received', { component: 'WebSocket', operation: 'message_validation',