mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:03:42 +03:00
gopher: reject CR and LF in the selector
Verifed in test 1609 Closes #22116
This commit is contained in:
parent
d786a85f19
commit
65d8eaeaa2
3 changed files with 49 additions and 1 deletions
38
tests/data/test1609
Normal file
38
tests/data/test1609
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="US-ASCII"?>
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
GOPHER
|
||||
CRLF-in-URL
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
gopher
|
||||
</server>
|
||||
<name>
|
||||
Gopher with URL-encoded CR LF in the selector
|
||||
</name>
|
||||
<command>
|
||||
gopher://%HOSTIP:%GOPHERPORT/1/sel%0d%0aINJECT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# 3 - CURLE_URL_MALFORMAT
|
||||
<errorcode>
|
||||
3
|
||||
</errorcode>
|
||||
# nothing must reach the server, the selector is rejected before any send
|
||||
<protocol nonewline="yes">
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue