From 946ce5b61fc3832935ea92b4388116c7f637fb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Sun, 25 Feb 2018 20:17:25 +0100 Subject: 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 --- tests/data/Makefile.inc | 2 +- tests/data/test2075 | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/data/test2075 (limited to 'tests/data') 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 @@ + + + +--disallow-username-in-url +HTTP + + + +# +# Client-side + + +http + + +none + + +Verify usernames are not allowed in url + + +--disallow-username-in-url http://username:password@example.com/ + + + +# +# Verify data after the test has been "shot" + +# CURLE_LOGIN_DENIED is code 67 + +67 + + + -- cgit v1.2.3