Skip to content

Commit

Permalink
add tests cases from open issues
Browse files Browse the repository at this point in the history
To verify use of null bytes in URLs
  • Loading branch information
jacobmealey authored and bagder committed Feb 19, 2024
1 parent d801161 commit e19615d
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -2355,5 +2355,73 @@
"stderr": "trurl note: key 'key' not in url, appending to query\n",
"returncode": 0
}
},
{
"input": {
"arguments": [
"0?00%000000000000000000000=0000000000"
]
},
"expected": {
"stdout": "http://0.0.0.0/?00%000000000000000000000=0000000000\n",
"stderr": "",
"returncode": 0
}
},
{
"input": {
"arguments": [
"--json",
"0?0%000000000000000000000000000000000"
]
},
"expected": {
"returncode": 0,
"stderr": "",
"stdout": [
{
"url": "http://0.0.0.0/?0%000000000000000000000000000000000",
"parts": {
"scheme": "http",
"host": "0.0.0.0",
"path": "/"
},
"params": [
{
"key": "0\u00000000000000000000000000000000000",
"value": ""
}
]
}
]
}
},
{
"input": {
"arguments": [
"--json",
"0?0%000000000000000000000000000000000=000%0000000000"
]
},
"expected": {
"returncode": 0,
"stderr": "",
"stdout": [
{
"url": "http://0.0.0.0/?0%000000000000000000000000000000000=000%0000000000",
"parts": {
"scheme": "http",
"host": "0.0.0.0",
"path": "/"
},
"params": [
{
"key": "0\u00000000000000000000000000000000000",
"value": "000\u000000000000"
}
]
}
]
}
}
]

0 comments on commit e19615d

Please sign in to comment.