]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test445: verifies the protocols-over-http-proxy flaw and fix
authorDaniel Stenberg <daniel@haxx.se>
Thu, 6 Oct 2022 12:14:25 +0000 (14:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 Oct 2022 13:30:25 +0000 (15:30 +0200)
tests/data/Makefile.inc
tests/data/test445 [new file with mode: 0644]

index 99dc92cb3b3ee4889b5f13a9a8b331a4c5b505b6..cbb27973cb5c74fa6c382529b6b78d65e378abf6 100644 (file)
@@ -71,7 +71,7 @@ test408 test409 test410 test411 test412 test413 test414 test415 \
 \
 test430 test431 test432 test433 test434 test435 test436 \
 \
-test440 test441 test442 test443 test444 \
+test440 test441 test442 test443 test444 test445 \
 \
 test490 test491 test492 test493 test494 test495 test496 \
 \
diff --git a/tests/data/test445 b/tests/data/test445
new file mode 100644 (file)
index 0000000..0406c0f
--- /dev/null
@@ -0,0 +1,61 @@
+<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>