From 6bc29e11db8ea7338cd9df613abb32d6c9fc348f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 Aug 2025 22:28:12 -0600 Subject: [PATCH] Use case in-sensitive matching for sec-websocket-key header #7454 --- core/websockets/resources/classes/websocket_service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/websockets/resources/classes/websocket_service.php b/core/websockets/resources/classes/websocket_service.php index 2abe24635b..1ce547a9da 100644 --- a/core/websockets/resources/classes/websocket_service.php +++ b/core/websockets/resources/classes/websocket_service.php @@ -762,7 +762,7 @@ class websocket_service extends service { break; } } - if (!preg_match("/Sec-WebSocket-Key: (.*)\r\n/", $request_header, $matches)) { + if (!preg_match("/Sec-WebSocket-Key: (.*)\r\n/i", $request_header, $matches)) { throw new invalid_handshake_exception($resource, "Invalid WebSocket handshake"); } $key = trim($matches[1]);