[Webkit-unassigned] [Bug 228329] New: WebSocket: Safari on iOS 15 beta 3 is sending invalid close frame
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 27 09:20:12 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=228329
Bug ID: 228329
Summary: WebSocket: Safari on iOS 15 beta 3 is sending invalid
close frame
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Other
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: lars at ionic.io
Created attachment 434293
--> https://bugs.webkit.org/attachment.cgi?id=434293&action=review
WebSocket close frame with invalid status code
We have a dev-server based on the ws Node library. We've noticed that Safari on iOS 15 beta 3 is causing ws to throw "RangeError: Invalid WebSocket frame: invalid status code 22373" (as reported by other users at https://github.com/websockets/ws/issues/1916). I've tracked this down to Safari sending a WebSocket close frame without a two-byte status code, so the first two bytes of the reason "WebSocket is closed due to suspension." are interpreted as the status code, i.e. 'We' == 0x5765 == 22373. As far as I can tell the message originates at https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Modules/websockets/WebSocket.cpp#L522. I suspect r270882 surfaced this issue by now closing the WebSocket when WebSocketChannel::fail() is called. I have a hard time following the code from there, but I believe it eventually ends up calling NSURLSessionWebSocketTask::cancelWithCloseCode in https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm#L152 with a status code.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210727/5bdfb8bc/attachment.htm>
More information about the webkit-unassigned
mailing list