Fixing CI/CD errors

This commit is contained in:
Miroslav Štampar 2026-08-04 17:18:24 +02:00
parent cb8298d55a
commit fca694c327
3 changed files with 24 additions and 10 deletions

View file

@ -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)

View file

@ -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()