summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-4.patch
blob: 6ea5bdb06580f39fd04568b2ec9ca1285974c212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From ee501847c38e21be0683ba81925472f219044a65 Mon Sep 17 00:00:00 2001
From: Delta Regeer <bertjw@regeer.org>
Date: Sun, 3 Mar 2024 16:26:22 -0700
Subject: [PATCH] Don't exit handle_write early -- even if socket is not
 connected

Calling handle_close() multiple times does not hurt anything, and is
safe.

CVE: CVE-2024-49769
Upstream-Status: Backport [https://github.com/Pylons/waitress/commit/8cba302b1ac08c2874ae179b2af2445e89311bac]
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 src/waitress/channel.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/waitress/channel.py b/src/waitress/channel.py
index cf19ef2..f4d9677 100644
--- a/src/waitress/channel.py
+++ b/src/waitress/channel.py
@@ -91,13 +91,7 @@ class HTTPChannel(wasyncore.dispatcher):
         # Precondition: there's data in the out buffer to be sent, or
         # there's a pending will_close request
 
-        if not self.connected:
-            # we dont want to close the channel twice
-
-            return
-
         # try to flush any pending output
-
         if not self.requests:
             # 1. There are no running tasks, so we don't need to try to lock
             #    the outbuf before sending