From 169fedbdce93ecf14befb6e0e1ce6a2d480252a3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 14 Dec 2013 22:39:27 +0100 Subject: login options: remove the ;[options] support from CURLOPT_USERPWD To avoid the regression when users pass in passwords containing semi- colons, we now drop the ability to set the login options with the same options. Support for login options in CURLOPT_USERPWD was added in 7.31.0. Test case 83 was modified to verify that colons and semi-colons can be used as part of the password when using -u (CURLOPT_USERPWD). Bug: http://curl.haxx.se/bug/view.cgi?id=1311 Reported-by: Petr Bahula Assisted-by: Steve Holme Signed-off-by: Daniel Stenberg --- src/tool_getparam.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/tool_getparam.c') diff --git a/src/tool_getparam.c b/src/tool_getparam.c index d0feb71ed..542bea022 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -218,6 +218,7 @@ static const struct LongShort aliases[]= { {"El", "tlspassword", TRUE}, {"Em", "tlsauthtype", TRUE}, {"En", "ssl-allow-beast", FALSE}, + {"Eo", "login-options", TRUE}, {"f", "fail", FALSE}, {"F", "form", TRUE}, {"Fs", "form-string", TRUE}, @@ -1366,10 +1367,15 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ else return PARAM_LIBCURL_DOESNT_SUPPORT; break; - case 'n': /* no empty SSL fragments */ + case 'n': /* no empty SSL fragments, --ssl-allow-beast */ if(curlinfo->features & CURL_VERSION_SSL) config->ssl_allow_beast = toggle; break; + + case 'o': /* --login-options */ + GetStr(&config->login_options, nextarg); + break; + default: /* certificate file */ { char *certname, *passphrase; @@ -1687,7 +1693,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } break; case 'u': - /* user:password;options */ + /* user:password */ GetStr(&config->userpwd, nextarg); cleanarg(nextarg); break; -- cgit v1.2.3