Files
openGauss-third_party/dependency/libcurl/CVE-2023-23914-3.patch

63 lines
2.1 KiB
Diff

From a991171771f0d10f33d164cc8e74ae1f3feb1fdb Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Tue, 27 Dec 2022 11:50:23 +0100
Subject: [PATCH 3/5] [Backport] runtests: support crlf="yes" for verify/proxy
Offering: RTOS
CVE: CVE-2023-23914
Reference: https://github.com/curl/curl/commit/dc0725244a3163f1e2d5f51165db3a1a430f3ba0
DTS/AR: DTS2023021511961
type: LTS
reason: support crlf="yes" for verify/proxy
(cherry picked from commit dc0725244a3163f1e2d5f51165db3a1a430f3ba0)
Conflicts:
tests/FILEFORMAT.md
Signed-off-by: chenzanyu <chenzanyu@huawei.com>
---
tests/FILEFORMAT.md | 4 ++--
tests/runtests.pl | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md
index 7a9c48204..e17605beb 100644
--- a/tests/FILEFORMAT.md
+++ b/tests/FILEFORMAT.md
@@ -527,14 +527,14 @@ changing protocol data such as port numbers or user-agent strings.
One perl op per line that operates on the protocol dump. This is pretty
advanced. Example: `s/^EPRT .*/EPRT stripped/`.
-### `<protocol [nonewline="yes"]>`
+### `<protocol [nonewline="yes"][crlf="yes"]>`
the protocol dump curl should transmit, if 'nonewline' is set, we will cut off
the trailing newline of this given data before comparing with the one actually
sent by the client The `<strip>` and `<strippart>` rules are applied before
comparisons are made.
-### `<proxy [nonewline="yes"]>`
+### `<proxy [nonewline="yes"][crlf="yes"]>`
The protocol dump curl should transmit to a HTTP proxy (when the http-proxy
server is used), if 'nonewline' is set, we will cut off the trailing newline
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 9afc97df0..ecb5f93da 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -4470,6 +4470,11 @@ sub singletest {
}
}
+ if($hash{'crlf'} ||
+ ($has_hyper && ($keywords{"HTTP"} || $keywords{"HTTPS"}))) {
+ map subNewlines(0, \$_), @protstrip;
+ }
+
$res = compare($testnum, $testname, "proxy", \@out, \@protstrip);
if($res) {
return $errorreturncode;
--
2.35.1.windows.2