mirror of
https://github.com/sqlmapproject/sqlmap
synced 2025-12-08 01:13:17 +01:00
finally a proper fix for that annoying recursive bug
This commit is contained in:
parent
f27f05308a
commit
a010386a23
1 changed files with 7 additions and 0 deletions
|
|
@ -29,5 +29,12 @@ class SmartHTTPBasicAuthHandler(urllib2.HTTPBasicAuthHandler):
|
|||
if hash(req) not in self.retried_req:
|
||||
self.retried_req.add(hash(req))
|
||||
self.retried = 0
|
||||
else:
|
||||
if self.retried > 5:
|
||||
raise urllib2.HTTPError(req.get_full_url(), 401, "basic auth failed",
|
||||
headers, None)
|
||||
else:
|
||||
self.retried += 1
|
||||
|
||||
return urllib2.HTTPBasicAuthHandler.http_error_auth_reqed(
|
||||
self, auth_header, host, req, headers)
|
||||
|
|
|
|||
Loading…
Reference in a new issue