From 2530de4c1f4acdd5bda2bf87a36dd5acbbabb1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 12 Nov 2026 15:03:20 +0100 Subject: [PATCH] Fix for -r request files with multiple Cookie headers and HTTP/2 pseudo-headers --- lib/core/common.py | 6 +++++- lib/core/settings.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index f05579d7e..cc44162ee 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -5793,6 +5793,10 @@ def parseRequestFile(reqFile, checkParams=True): elif "?" in line and "=" in line and ": " not in line: params = True + # HTTP/2 pseudo-headers (e.g. ':authority') + elif line.startswith(':'): + continue + # Headers elif re.search(r"\A\S+:", line): key, value = line.split(":", 1) @@ -5807,7 +5811,7 @@ def parseRequestFile(reqFile, checkParams=True): # Cookie and Host headers if key.upper() == HTTP_HEADER.COOKIE.upper(): - cookie = value + cookie = "%s; %s" % (cookie, value) if cookie else value # Note: (e.g. HTTP/2) cookies can be split into multiple headers elif key.upper() == HTTP_HEADER.HOST.upper(): if '://' in value: scheme, value = value.split('://')[:2] diff --git a/lib/core/settings.py b/lib/core/settings.py index 7caa61073..b714be69f 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.11.47" +VERSION = "1.10.11.48" 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)