tool_xattr: "guess" URL scheme if none is provided

... when figuring out the source URL to store.

Reported-by: Dagfinn Ilmari Mannsåker
Fixes #13205
Closes #13221
This commit is contained in:
Daniel Stenberg 2024-03-28 13:16:04 +01:00
parent a15de6f785
commit 5564751f27
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -55,7 +55,7 @@ char *stripcredentials(const char *url)
char *nurl;
u = curl_url();
if(u) {
uc = curl_url_set(u, CURLUPART_URL, url, 0);
uc = curl_url_set(u, CURLUPART_URL, url, CURLU_GUESS_SCHEME);
if(uc)
goto error;