mirror of
https://github.com/curl/curl.git
synced 2026-07-24 16:47:16 +03:00
urlapi: reject short file URLs
file URLs that are 6 bytes or shorter are not complete. Return CURLUE_MALFORMED_INPUT for those. Extended test 1560 to verify. Triggered by #8041 Closes #8042
This commit is contained in:
parent
ffb6a9e8a6
commit
3e6eb18fce
2 changed files with 10 additions and 0 deletions
|
|
@ -267,6 +267,12 @@ static const struct testcase get_parts_list[] ={
|
|||
{"file:/hello.html",
|
||||
"file | [11] | [12] | [13] | [14] | [15] | /hello.html | [16] | [17]",
|
||||
0, 0, CURLUE_OK},
|
||||
{"file:/h",
|
||||
"file | [11] | [12] | [13] | [14] | [15] | /h | [16] | [17]",
|
||||
0, 0, CURLUE_OK},
|
||||
{"file:/",
|
||||
"file | [11] | [12] | [13] | [14] | [15] | | [16] | [17]",
|
||||
0, 0, CURLUE_MALFORMED_INPUT},
|
||||
{"file://127.0.0.1/hello.html",
|
||||
"file | [11] | [12] | [13] | [14] | [15] | /hello.html | [16] | [17]",
|
||||
0, 0, CURLUE_OK},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue