File curl-CVE-2022-32221.patch of Package curl.26475
From a64e3e59938abd7d667e4470a18072a24d7e9de9 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Thu, 15 Sep 2022 09:22:45 +0200
Subject: [PATCH] setopt: when POST is set, reset the 'upload' field
Reported-by: RobBotic1 on github
Fixes #9507
Closes #9511
---
lib/setopt.c | 1 +
1 file changed, 1 insertion(+)
Index: curl-7.37.0/lib/url.c
===================================================================
--- curl-7.37.0.orig/lib/url.c
+++ curl-7.37.0/lib/url.c
@@ -956,6 +956,7 @@ CURLcode Curl_setopt(struct SessionHandl
}
else
data->set.httpreq = HTTPREQ_GET;
+ data->set.upload = FALSE;
break;
case CURLOPT_COPYPOSTFIELDS:
@@ -6171,4 +6172,4 @@ static unsigned int get_protocol_family(
}
return family;
-}
\ No newline at end of file
+}