mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-20 23:23:21 +00:00
Fixing CI/CD errors
This commit is contained in:
parent
cb8298d55a
commit
fca694c327
3 changed files with 24 additions and 10 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.8.0"
|
||||
VERSION = "1.10.8.1"
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,13 @@ class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler):
|
|||
# Note: multiple cookies arrive as SEPARATE Set-Cookie headers (RFC-6265 forbids folding
|
||||
# them into one comma-joined value), and __getitem__ returns only the FIRST - iterate all
|
||||
# values so 2nd+ cookies (e.g. a CSRF token) are not silently dropped across the redirect
|
||||
setCookies = headers.get_all(HTTP_HEADER.SET_COOKIE) if hasattr(headers, "get_all") else [headers[HTTP_HEADER.SET_COOKIE]]
|
||||
# (get_all on py3 email.message.Message, getheaders on py2 mimetools.Message)
|
||||
if hasattr(headers, "get_all"):
|
||||
setCookies = headers.get_all(HTTP_HEADER.SET_COOKIE)
|
||||
elif hasattr(headers, "getheaders"):
|
||||
setCookies = headers.getheaders(HTTP_HEADER.SET_COOKIE)
|
||||
else:
|
||||
setCookies = [headers[HTTP_HEADER.SET_COOKIE]]
|
||||
for setCookie in setCookies:
|
||||
for match in re.finditer(r"(?:^|,\s*)([^=;,]+)=([^;,]+)", setCookie):
|
||||
key = match.group(1).strip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue