mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
better way for dealing with relative paths
This commit is contained in:
@@ -54,7 +54,7 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
|
||||
result.redurl = headers.getheaders("uri")[0].split("?")[0]
|
||||
|
||||
if hasattr(result, 'redurl'):
|
||||
if result.redurl.startswith('.') or result.redurl.startswith('/'):
|
||||
if not urlparse.urlsplit(result.redurl).netloc:
|
||||
result.redurl = urlparse.urljoin(conf.url, result.redurl)
|
||||
|
||||
if "set-cookie" in headers:
|
||||
|
||||
Reference in New Issue
Block a user