From 92fc8065e96db4969b78121378749518f73680b6 Mon Sep 17 00:00:00 2001 From: Andrew Demczuk Date: Sun, 15 Mar 2026 00:46:24 +0100 Subject: [PATCH] fix(gateway): remove re-introduced auth.mode=none pairing bypass The revert of #43478 (commit 39b4185d0b) was silently undone by 3704293e6f which was based on a branch that included the original change. This removes the auth.mode=none skipPairing condition again. The blanket skip was too broad - it disabled pairing for ALL websocket clients, not just Control UI behind reverse proxies. --- src/gateway/server/ws-connection/message-handler.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gateway/server/ws-connection/message-handler.ts b/src/gateway/server/ws-connection/message-handler.ts index 49f70915992..e0116190009 100644 --- a/src/gateway/server/ws-connection/message-handler.ts +++ b/src/gateway/server/ws-connection/message-handler.ts @@ -674,18 +674,14 @@ export function attachGatewayWsMessageHandler(params: { authOk, authMethod, }); - // auth.mode=none disables all authentication — device pairing is an - // auth mechanism and must also be skipped when the operator opted out. const skipPairing = - resolvedAuth.mode === "none" || shouldSkipBackendSelfPairing({ connectParams, isLocalClient, hasBrowserOriginHeader, sharedAuthOk, authMethod, - }) || - shouldSkipControlUiPairing(controlUiAuthPolicy, role, trustedProxyAuthOk); + }) || shouldSkipControlUiPairing(controlUiAuthPolicy, role, trustedProxyAuthOk); if (device && devicePublicKey && !skipPairing) { const formatAuditList = (items: string[] | undefined): string => { if (!items || items.length === 0) {