mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
Merge pull request #130 from vbanos/better-url-validation
Improve target url validation
This commit is contained in:
commit
653dec71ae
@ -240,7 +240,7 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler):
|
||||
else:
|
||||
self.url = self.path
|
||||
u = urllib_parse.urlparse(self.url)
|
||||
if u.scheme != 'http':
|
||||
if u.scheme != 'http' or u.netloc == '':
|
||||
raise Exception(
|
||||
'unable to parse request %r as a proxy request' % (
|
||||
self.requestline))
|
||||
|
Loading…
x
Reference in New Issue
Block a user