diff options
-rw-r--r-- | src/tool_getparam.c | 10 | ||||
-rw-r--r-- | src/tool_operate.c | 12 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 813cc70c0..b5068ac5f 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -1633,22 +1633,14 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } break; case 'u': - /* user:password */ + /* user:password;options */ GetStr(&config->userpwd, nextarg); cleanarg(nextarg); - if(!config->xoauth2_bearer) { - err = checkpasswd("host", &config->userpwd); - if(err) - return err; - } break; case 'U': /* Proxy user:password */ GetStr(&config->proxyuserpwd, nextarg); cleanarg(nextarg); - err = checkpasswd("proxy", &config->proxyuserpwd); - if(err) - return err; break; case 'v': if(toggle) { diff --git a/src/tool_operate.c b/src/tool_operate.c index a37e0c84d..146795e69 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -325,6 +325,18 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) } } + if(config->userpwd && !config->xoauth2_bearer) { + res = checkpasswd("host", &config->userpwd); + if(res) + goto quit_curl; + } + + if(config->proxyuserpwd) { + res = checkpasswd("proxy", &config->proxyuserpwd); + if(res) + goto quit_curl; + } + if((!config->url_list || !config->url_list->url) && !config->list_engines) { helpf(config->errors, "no URL specified!\n"); res = CURLE_FAILED_INIT; |