mirror of
https://github.com/curl/curl.git
synced 2026-07-29 19:39:15 +03:00
http: fix Basic auth with empty name field in URL
Add test 367 to verify. Reported-by: Rick Lane Fixes #7819 Closes #7820
This commit is contained in:
parent
5f563495f1
commit
87907d56f0
3 changed files with 50 additions and 2 deletions
|
|
@ -323,7 +323,7 @@ static CURLcode http_output_basic(struct Curl_easy *data, bool proxy)
|
|||
pwd = data->state.aptr.passwd;
|
||||
}
|
||||
|
||||
out = aprintf("%s:%s", user, pwd ? pwd : "");
|
||||
out = aprintf("%s:%s", user ? user : "", pwd ? pwd : "");
|
||||
if(!out)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue