mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Fixing Set-Cookie handling in redirection responses
This commit is contained in:
parent
8d91c65bdb
commit
10282a3993
3 changed files with 4 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.6.27"
|
||||
VERSION = "1.10.6.28"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler):
|
|||
delimiter = conf.cookieDel or DEFAULT_COOKIE_DELIMITER
|
||||
last = None
|
||||
|
||||
for part in getUnicode(req.headers.get(HTTP_HEADER.COOKIE, "")).split(delimiter) + ([headers[HTTP_HEADER.SET_COOKIE]] if HTTP_HEADER.SET_COOKIE in headers else []):
|
||||
for part in getUnicode(req.headers.get(HTTP_HEADER.COOKIE, "")).split(delimiter) + ([headers[HTTP_HEADER.SET_COOKIE].split(';')[0]] if HTTP_HEADER.SET_COOKIE in headers else []):
|
||||
if '=' in part:
|
||||
part = part.strip()
|
||||
key, value = part.split('=', 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue