mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:27:18 +03:00
tool_parsecfg: detect and error on recursive --config use
The config file parser now has a maximum level of inclusions allowed (5) to detect and prevent recursive inclusions of itself leading to badness. Bonus: clean up return code handling from the config parser. Test 774 verifies Closes #19168
This commit is contained in:
parent
b4f57c8045
commit
9e198618de
10 changed files with 72 additions and 32 deletions
25
tests/data/test774
Normal file
25
tests/data/test774
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
--config
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
<client>
|
||||
<name>
|
||||
config file recursively including itself
|
||||
</name>
|
||||
<file name="%LOGDIR/cmd">
|
||||
--config %LOGDIR/cmd
|
||||
</file>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/ -K %LOGDIR/cmd
|
||||
</command>
|
||||
</client>
|
||||
|
||||
<verify>
|
||||
<errorcode>
|
||||
2
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue