mirror of
https://github.com/curl/curl.git
synced 2026-07-29 03:13:07 +03:00
tool_ipfs: accept IPFS gateway URL without set port number
Follow-up to: 56129718b8
Test 1851 added to verify
Pointed out by Codex Security
Closes #20957
This commit is contained in:
parent
f1a5343f5e
commit
f4c0590b1c
3 changed files with 58 additions and 2 deletions
|
|
@ -166,7 +166,8 @@ CURLcode ipfs_url_rewrite(CURLU *uh, const char *protocol, char **url,
|
|||
/* get gateway parts */
|
||||
if(curl_url_get(gatewayurl, CURLUPART_HOST, &gwhost, CURLU_URLDECODE) ||
|
||||
curl_url_get(gatewayurl, CURLUPART_SCHEME, &gwscheme, CURLU_URLDECODE) ||
|
||||
curl_url_get(gatewayurl, CURLUPART_PORT, &gwport, CURLU_URLDECODE) ||
|
||||
curl_url_get(gatewayurl, CURLUPART_PORT, &gwport,
|
||||
CURLU_URLDECODE | CURLU_DEFAULT_PORT) ||
|
||||
curl_url_get(gatewayurl, CURLUPART_PATH, &gwpath, CURLU_URLDECODE))
|
||||
goto clean;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue