xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | dotdot removal |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | <data> |
| 14 | HTTP/1.1 200 OK |
| 15 | Content-Length: 6 |
| 16 | Connection: close |
| 17 | |
| 18 | -foo- |
| 19 | </data> |
| 20 | |
| 21 | <data1> |
| 22 | HTTP/1.1 200 OK |
| 23 | Content-Length: 7 |
| 24 | Connection: close |
| 25 | |
| 26 | -cool- |
| 27 | </data1> |
| 28 | </reply> |
| 29 | |
| 30 | # |
| 31 | # Client-side |
| 32 | <client> |
| 33 | <server> |
| 34 | http |
| 35 | </server> |
| 36 | <name> |
| 37 | HTTP URL with dotdot removal from path |
| 38 | </name> |
| 39 | <command> |
| 40 | http://%HOSTIP:%HTTPPORT/../../hej/but/who/../%TESTNUMBER?stupid=me/../%TESTNUMBER#soo/../%TESTNUMBER http://%HOSTIP:%HTTPPORT/../../hej/but/who/../%TESTNUMBER0001#/../%TESTNUMBER0001 |
| 41 | </command> |
| 42 | </client> |
| 43 | |
| 44 | # |
| 45 | # Verify data after the test has been "shot" |
| 46 | <verify> |
| 47 | <protocol> |
| 48 | GET /hej/but/%TESTNUMBER?stupid=me/../%TESTNUMBER HTTP/1.1
|
| 49 | Host: %HOSTIP:%HTTPPORT
|
| 50 | User-Agent: curl/%VERSION
|
| 51 | Accept: */*
|
| 52 |
|
| 53 | GET /hej/but/%TESTNUMBER0001 HTTP/1.1
|
| 54 | Host: %HOSTIP:%HTTPPORT
|
| 55 | User-Agent: curl/%VERSION
|
| 56 | Accept: */*
|
| 57 |
|
| 58 | </protocol> |
| 59 | </verify> |
| 60 | </testcase> |