From 81eb7cf7422878f0b78b833a3b741f734502921f Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Fri, 20 Sep 2024 12:12:38 +0200 Subject: [PATCH 2/4] websocket-test: set the total message size This is required when sending a big amount of data Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/4904a46a2d9a014efa6be01a186ac353dbf5047b] CVE: CVE-2025-32049 Signed-off-by: Changqing Li --- tests/websocket-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/websocket-test.c b/tests/websocket-test.c index a0b8334..827b041 100644 --- a/tests/websocket-test.c +++ b/tests/websocket-test.c @@ -567,6 +567,11 @@ test_send_big_packets (Test *test, soup_websocket_connection_set_max_incoming_payload_size (test->server, 1000 * 1000 + 1); g_assert (soup_websocket_connection_get_max_incoming_payload_size (test->server) == (1000 * 1000 + 1)); + soup_websocket_connection_set_max_total_message_size (test->client, 1000 * 1000 + 1); + g_assert (soup_websocket_connection_get_max_total_message_size (test->client) == (1000 * 1000 + 1)); + soup_websocket_connection_set_max_total_message_size (test->server, 1000 * 1000 + 1); + g_assert (soup_websocket_connection_get_max_total_message_size (test->server) == (1000 * 1000 + 1)); + sent = g_bytes_new_take (g_strnfill (1000 * 1000, '?'), 1000 * 1000); soup_websocket_connection_send_text (test->server, g_bytes_get_data (sent, NULL)); WAIT_UNTIL (received != NULL); -- 2.34.1