mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-12-12 15:46:08 +00:00
Three more errors turned up with fuzzing.
These are fixed in netlib, regression tests added here.
This commit is contained in:
parent
7835e0c2c7
commit
8216801728
@ -3,7 +3,7 @@
|
||||
# mitmproxy/mitmdump is running on port 8080 in straight proxy mode.
|
||||
# pathod is running on port 9999
|
||||
|
||||
BASE="/Users/aldo/git/public/pathod/venv/bin/pathoc -eo -I 200,400,502 -p 8080 localhost "
|
||||
$BASE -n 1000 "get:'http://localhost:9999':ir,@1"
|
||||
BASE="/Users/aldo/git/public/pathod/venv/bin/pathoc -eo -I 200,400,405,502 -p 8080 localhost "
|
||||
$BASE -n 10000 "get:'http://localhost:9999':ir,@1"
|
||||
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import tservers
|
||||
|
||||
"""
|
||||
A collection of errors turned up by fuzzing.
|
||||
A collection of errors turned up by fuzzing. Errors are integrated here
|
||||
after being fixed to check for regressions.
|
||||
"""
|
||||
|
||||
class TestFuzzy(tservers.HTTPProxTest):
|
||||
@ -10,3 +11,17 @@ class TestFuzzy(tservers.HTTPProxTest):
|
||||
p = self.pathoc()
|
||||
assert p.request(req%self.server.port).status_code == 400
|
||||
|
||||
def test_nullbytes(self):
|
||||
req = r'get:"http://localhost:%s":i19,"\x00"'
|
||||
p = self.pathoc()
|
||||
assert p.request(req%self.server.port).status_code == 400
|
||||
|
||||
def test_invalid_ports(self):
|
||||
req = 'get:"http://localhost:999999"'
|
||||
p = self.pathoc()
|
||||
assert p.request(req).status_code == 400
|
||||
|
||||
def test_invalid_ipv6_url(self):
|
||||
req = 'get:"http://localhost:%s":i13,"["'
|
||||
p = self.pathoc()
|
||||
assert p.request(req%self.server.port).status_code == 400
|
||||
|
Loading…
Reference in New Issue
Block a user