From d10c3b0088acc6338e154274467ecb35d2e94546 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Mon, 6 Apr 2026 06:16:10 -0700 Subject: [PATCH] fix: guard Bearer header in WebSocket federation proxy for empty key The source-inspection test correctly caught one remaining unguarded Authorization header in the WS proxy additional_headers. Applied the same 'if remote_key else {}' pattern as the other 4 federation endpoints. --- muxplex/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/muxplex/main.py b/muxplex/main.py index a43bc1c..7c2b51e 100644 --- a/muxplex/main.py +++ b/muxplex/main.py @@ -760,9 +760,7 @@ async def federation_terminal_ws_proxy(websocket: WebSocket, remote_id: int) -> async with websockets.connect( ws_url, subprotocols=[Subprotocol("tty")], - additional_headers={"Authorization": f"Bearer {remote_key}"} - if remote_key - else {}, + additional_headers={"Authorization": f"Bearer {remote_key}"} if remote_key else {}, ) as remote_ws: async def client_to_remote() -> None: