aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2018-02-25 20:17:25 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-05-31 11:27:16 +0200
commit946ce5b61fc3832935ea92b4388116c7f637fb8c (patch)
tree3d4ef97037f869fdccb509940e35c972d476ee82 /tests
parent71d35e4a1d96011076d3e81cad4e7b417d9a3985 (diff)
option: disallow username in URL
Adds CURLOPT_DISALLOW_USERNAME_IN_URL and --disallow-username-in-url. Makes libcurl reject URLs with a username in them. Closes #2340
Diffstat (limited to 'tests')
-rw-r--r--tests/data/Makefile.inc2
-rw-r--r--tests/data/test207534
2 files changed, 35 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index bce8c9798..0b487ec68 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -196,6 +196,6 @@ test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
test2064 test2065 test2066 test2067 test2068 test2069 \
\
test2070 test2071 test2072 test2073 \
-test2074 \
+test2074 test2075 \
\
test3000 test3001
diff --git a/tests/data/test2075 b/tests/data/test2075
new file mode 100644
index 000000000..88db7ae29
--- /dev/null
+++ b/tests/data/test2075
@@ -0,0 +1,34 @@
+<testcase>
+<info>
+<keywords>
+--disallow-username-in-url
+HTTP
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<features>
+http
+</features>
+<server>
+none
+</server>
+<name>
+Verify usernames are not allowed in url
+</name>
+<command>
+--disallow-username-in-url http://username:password@example.com/
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# CURLE_LOGIN_DENIED is code 67
+<errorcode>
+67
+</errorcode>
+</verify>
+</testcase>