File curl-CVE-2022-32221.patch of Package curl.27751
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.66.0/lib/setopt.c
===================================================================
--- curl-7.66.0.orig/lib/setopt.c
+++ curl-7.66.0/lib/setopt.c
@@ -486,6 +486,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *
}
else
data->set.httpreq = HTTPREQ_GET;
+ data->set.upload = FALSE;
break;
case CURLOPT_COPYPOSTFIELDS: