Fix for --http2 silently ignoring HTTP authentication (Basic sent preemptively, others rejected)

This commit is contained in:
Miroslav Štampar 2026-11-12 17:20:51 +01:00
parent cdb787faea
commit 04f0987e81
3 changed files with 10 additions and 1 deletions

View file

@ -2894,6 +2894,11 @@ def _basicOptionValidation():
errMsg = "HTTP/2 support is currently incompatible with SOCKS/Tor proxies"
raise SqlmapSyntaxException(errMsg)
# Note: native HTTP/2 client bypasses urllib's (challenge-response) authentication handlers (only Basic is sent preemptively)
if conf.http2 and ((conf.authType or "").lower() not in ("", AUTH_TYPE.BASIC, AUTH_TYPE.BEARER) or conf.authFile):
errMsg = "HTTP/2 support is currently incompatible with HTTP authentication type '%s'" % (conf.authType or AUTH_TYPE.PKI)
raise SqlmapSyntaxException(errMsg)
if conf.uValues and conf.uChar:
errMsg = "option '--union-values' is incompatible with option '--union-char'"
raise SqlmapSyntaxException(errMsg)

View file

@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.11.66"
VERSION = "1.10.11.67"
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)