diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69228.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69228.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69228.patch b/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69228.patch new file mode 100644 index 0000000000..74e383ea1b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69228.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From 8426e0e6df8a3481c7482d4fbce749bfe77e2e44 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 3 | Date: Sat, 3 Jan 2026 02:48:45 +0000 | ||
| 4 | Subject: [PATCH] Enforce client_max_size over entire multipart form (#11889) | ||
| 5 | (#11908) | ||
| 6 | |||
| 7 | From: Sam Bull <git@sambull.org> | ||
| 8 | |||
| 9 | (cherry picked from commit ed90718fab5d34c127a283e10385f19440df7dd0) | ||
| 10 | |||
| 11 | CVE: CVE-2025-69228 | ||
| 12 | Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/b7dbd35375aedbcd712cbae8ad513d56d11cce60] | ||
| 13 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 14 | --- | ||
| 15 | aiohttp/web_request.py | 2 +- | ||
| 16 | tests/test_web_functional.py | 4 ++-- | ||
| 17 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py | ||
| 20 | index 96222b0..b5fa40c 100644 | ||
| 21 | --- a/aiohttp/web_request.py | ||
| 22 | +++ b/aiohttp/web_request.py | ||
| 23 | @@ -721,8 +721,8 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin): | ||
| 24 | multipart = await self.multipart() | ||
| 25 | max_size = self._client_max_size | ||
| 26 | |||
| 27 | + size = 0 | ||
| 28 | while (field := await multipart.next()) is not None: | ||
| 29 | - size = 0 | ||
| 30 | field_ct = field.headers.get(hdrs.CONTENT_TYPE) | ||
| 31 | |||
| 32 | if isinstance(field, BodyPartReader): | ||
| 33 | diff --git a/tests/test_web_functional.py b/tests/test_web_functional.py | ||
| 34 | index c33b3ce..8ec237b 100644 | ||
| 35 | --- a/tests/test_web_functional.py | ||
| 36 | +++ b/tests/test_web_functional.py | ||
| 37 | @@ -1705,8 +1705,8 @@ async def test_app_max_client_size(aiohttp_client) -> None: | ||
| 38 | await resp.release() | ||
| 39 | |||
| 40 | |||
| 41 | -async def test_app_max_client_size_adjusted(aiohttp_client) -> None: | ||
| 42 | - async def handler(request): | ||
| 43 | +async def test_app_max_client_size_adjusted(aiohttp_client: AiohttpClient) -> None: | ||
| 44 | + async def handler(request: web.Request) -> web.Response: | ||
| 45 | await request.post() | ||
| 46 | return web.Response(body=b"ok") | ||
| 47 | |||
