提交 6d484763 编写于 作者: D Daniel Stenberg 提交者: wanghao-free

fix CVE-2022-42915, test445: verifies the protocols-over-http-proxy flaw and fix

Signed-off-by: Nzhouhaifeng <kutcher.zhou@huawei.com>
上级 9efe3670
...@@ -2137,7 +2137,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, ...@@ -2137,7 +2137,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
(void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0); (void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
#ifdef ENABLE_IPV6
if(data->set.scope_id) if(data->set.scope_id)
/* Override any scope that was set above. */ /* Override any scope that was set above. */
conn->scope_id = data->set.scope_id; conn->scope_id = data->set.scope_id;
......
...@@ -69,7 +69,7 @@ test409 test410 \ ...@@ -69,7 +69,7 @@ test409 test410 \
\ \
test430 test431 test432 test433 test434 \ test430 test431 test432 test433 test434 \
\ \
test442 test443 test444 \ test442 test443 test444 test445 \
\ \
test490 test491 test492 test493 test494 \ test490 test491 test492 test493 test494 \
\ \
......
<testcase>
<info>
<keywords>
HTTP
HTTP proxy
</keywords>
</info>
#
# Server-side
<reply>
<connect>
HTTP/1.1 503 no just no
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Accept-Ranges: bytes
Content-Length: 6
Connection: close
-foo-
</connect>
</reply>
#
# Client-side
<client>
<features>
gopher
dict
http
ftp
imap
ldap
mqtt
pop3
rtsp
scp
sftp
smb
smtp
</features>
<server>
http-proxy
</server>
<name>
Refuse tunneling protocols through HTTP proxy
</name>
<command>
-x http://%HOSTIP:%PROXYPORT/%TESTNUMBER -p gopher://127.0.0.1 dict://127.0.0.1 http://moo https://example telnet://another ftp://yes ftps://again imap://more ldap://perhaps mqtt://yes pop3://mail rtsp://harder scp://copy sftp://files smb://wird smtp://send
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
# refused in the CONNECT
<errorcode>
56
</errorcode>
</verify>
</testcase>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册