mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
better way for dealing with relative paths
This commit is contained in:
parent
a536bf210f
commit
ad25bcc2be
2 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue