Use case in-sensitive matching for sec-websocket-key header #7454

This commit is contained in:
FusionPBX
2025-08-12 22:28:12 -06:00
committed by GitHub
parent bce2095d5f
commit 6bc29e11db

View File

@@ -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]);