diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-09-20 21:49:41 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-09-20 21:49:41 +0000 |
commit | ec4a16f2e01b0b92e16fc841bc676394f37022f1 (patch) | |
tree | 7abb7dfa87e76e05c216a6d0196ed5236c82c8bf /lib | |
parent | ca5de26f50ae3c02db92592cd0aec1ff4fcc9785 (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 3 |
1 files changed, 2 insertions, 1 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)) { |