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:
Daniel Stenberg
2006-09-20 21:49:41 +00:00
parent ca5de26f50
commit ec4a16f2e0
6 changed files with 103 additions and 2 deletions

View File

@@ -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)) {