mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:13:37 +03:00
tool_getparam: warn on more unicode prefixes
If a string argument is expected and the first two bytes are 0xe2 ex80 and the third has the 7th bit set, that's enough for curl to warn. Previously we tried to detect and warn only for the unicode double quote, but users might use single quotes, other quotes or even lead the argument with one of the "zero widths" characters. This is an attempt to detect many of those. Without triggering for "normal" IDN hostnames. Closes #18459
This commit is contained in:
parent
4c70b71ba4
commit
765b5ab0cd
3 changed files with 13 additions and 8 deletions
|
|
@ -45,8 +45,8 @@ warn about Unicode quote character
|
|||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stderr>
|
||||
%hex[Warning: The argument '%e2%80%9chost:' starts with a Unicode quote where maybe an ]hex%
|
||||
Warning: ASCII " was intended?
|
||||
%hex[Warning: The argument '%e2%80%9chost:' starts with a Unicode character. Maybe ASCII ]hex%
|
||||
Warning: was intended?
|
||||
</stderr>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ warn about Unicode quote character read from config file
|
|||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stderr mode="text">
|
||||
%hex[Warning: The argument '%e2%80%9chost:fake%e2%80%9d' starts with a Unicode quote where ]hex%
|
||||
Warning: maybe an ASCII " was intended?
|
||||
%hex[Warning: The argument '%e2%80%9chost:fake%e2%80%9d' starts with a Unicode character. Maybe ]hex%
|
||||
Warning: ASCII was intended?
|
||||
</stderr>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue