mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:53:37 +03:00
Armel Asselin fixed problems when you gave a proxy URL with user name and
empty password or no password at all. Test case 278 and 279 were added to verify.
This commit is contained in:
parent
ca5de26f50
commit
ec4a16f2e0
6 changed files with 103 additions and 2 deletions
|
|
@ -3698,8 +3698,9 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
|||
if(atsign) {
|
||||
char proxyuser[MAX_CURL_USER_LENGTH];
|
||||
char proxypasswd[MAX_CURL_PASSWORD_LENGTH];
|
||||
proxypasswd[0] = 0;
|
||||
|
||||
if(2 == sscanf(proxyptr,
|
||||
if(1 <= sscanf(proxyptr,
|
||||
"%" MAX_CURL_USER_LENGTH_TXT"[^:]:"
|
||||
"%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
|
||||
proxyuser, proxypasswd)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue