diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-10-06 15:40:53 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-10-06 22:45:52 +0200 |
commit | 87907d56f0a2973bb7513f073f4f5a02a01d2ef2 (patch) | |
tree | c19d517a0073c4d146f800b6a864345c612d98d9 /lib | |
parent | 5f563495f1f9cf7ef4f23f997e4c2707dd3e74a8 (diff) | |
download | curl-87907d56f0a2973bb7513f073f4f5a02a01d2ef2.tar.gz |
http: fix Basic auth with empty name field in URL
Add test 367 to verify.
Reported-by: Rick Lane
Fixes #7819
Closes #7820
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index 648583c56..fe3f3a27b 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; |