Skip to content

Commit 71b65d4

Browse files
committed
feat: allow to provide query param without any value
1 parent 879723a commit 71b65d4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/arduino/app_peripherals/camera/websocket_camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ async def _ws_handler(self, conn: websockets.ServerConnection) -> None:
227227
if sanitized:
228228
client_name = sanitized
229229
# Allow raw (no BPP) mode only when security is disabled
230-
if "raw" in query_params and query_params["raw"][0].lower() == "true":
230+
if "raw" in query_params and (not query_params["raw"] or query_params["raw"][0].lower() != "false"):
231231
if self.secret is None:
232232
client_raw = True
233233
else:

src/arduino/app_peripherals/microphone/websocket_microphone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ async def _ws_handler(self, conn: websockets.ServerConnection) -> None:
234234
if sanitized:
235235
client_name = sanitized
236236
# Allow raw (no BPP) mode only when security is disabled
237-
if "raw" in query_params and query_params["raw"][0].lower() == "true":
237+
if "raw" in query_params and (not query_params["raw"] or query_params["raw"][0].lower() != "false"):
238238
if self.secret is None:
239239
client_raw = True
240240
else:

0 commit comments

Comments
 (0)