diff options
author | Björn Stenberg <bjorn@haxx.se> | 2018-02-25 20:17:25 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-05-31 11:27:16 +0200 |
commit | 946ce5b61fc3832935ea92b4388116c7f637fb8c (patch) | |
tree | 3d4ef97037f869fdccb509940e35c972d476ee82 /lib/setopt.c | |
parent | 71d35e4a1d96011076d3e81cad4e7b417d9a3985 (diff) | |
download | curl-946ce5b61fc3832935ea92b4388116c7f637fb8c.tar.gz |
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 'lib/setopt.c')
-rw-r--r-- | lib/setopt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/setopt.c b/lib/setopt.c index 93a4dd2b5..5ecf5b97f 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2590,6 +2590,10 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, case CURLOPT_DNS_SHUFFLE_ADDRESSES: data->set.dns_shuffle_addresses = (0 != va_arg(param, long)) ? TRUE:FALSE; break; + case CURLOPT_DISALLOW_USERNAME_IN_URL: + data->set.disallow_username_in_url = + (0 != va_arg(param, long)) ? TRUE : FALSE; + break; default: /* unknown tag and its companion, just ignore: */ result = CURLE_UNKNOWN_OPTION; |