Bug 219850 - [SOUP] WebSockets: wrong data sent in some cases with libsoup < 2.68
Summary: [SOUP] WebSockets: wrong data sent in some cases with libsoup < 2.68
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2020-12-14 05:42 PST by Carlos Garcia Campos
Modified: 2020-12-15 01:15 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2020-12-14 05:44 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2020-12-14 05:42:38 PST
We are using soup_websocket_connection_send_text() when libsoup < 2.68, which expects a null terminated string, but we are receiving a IPC::DataReference that needs to be converted to a null terminated string by taking into account its size.
Comment 1 Carlos Garcia Campos 2020-12-14 05:44:27 PST
Created attachment 416151 [details]
Patch
Comment 2 Alberto Garcia 2020-12-14 10:15:20 PST
This bug can be reproduced in https://www.websocket.org/echo.html using older versions of libsoup.

I confirm that the patch fixes the problem.
Comment 3 EWS 2020-12-15 01:15:43 PST
Committed r270825: <https://trac.webkit.org/changeset/270825>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416151 [details].