From a95e32dece2d505cb760b0c450b3c8f975725530 Mon Sep 17 00:00:00 2001 From: Alejo Thomas Ortega Date: Fri, 4 Oct 2024 17:20:36 -0300 Subject: [PATCH] fix: initial hand-shake from archipelago --- .../shared/realm/connections/ArchipelagoConnection.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser-interface/packages/shared/realm/connections/ArchipelagoConnection.ts b/browser-interface/packages/shared/realm/connections/ArchipelagoConnection.ts index ad6ca443af..47e9cb7315 100644 --- a/browser-interface/packages/shared/realm/connections/ArchipelagoConnection.ts +++ b/browser-interface/packages/shared/realm/connections/ArchipelagoConnection.ts @@ -74,6 +74,10 @@ export async function createArchipelagoConnection( switch (message.$case) { case 'challengeResponse': { + if (!message.challengeResponse.challengeToSign.startsWith('dcl-')) { + throw new Error('Invalid initial hand-shake') + } + const authChainJson = JSON.stringify( Authenticator.signPayload(identity, message.challengeResponse.challengeToSign) )