Fixing CI/CD errors

This commit is contained in:
Miroslav Štampar 2026-07-28 18:17:19 +02:00
parent 1dcca2c862
commit b0afe6b8d4
2 changed files with 9 additions and 1 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.7.225"
VERSION = "1.10.7.226"
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

@ -128,6 +128,7 @@ class TestErrorChunkLengthHex(unittest.TestCase):
"forceWhere": kb.get("forceWhere"), "technique": kb.get("technique"),
"inj": (kb.injection.place, kb.injection.parameter, kb.injection.data),
"qp": Connect.queryPage,
"dbmsHandler": conf.get("dbmsHandler"), "forceDbms": conf.get("forceDbms"),
}
conf.hexConvert = False
conf.charset = None
@ -141,6 +142,11 @@ class TestErrorChunkLengthHex(unittest.TestCase):
kb.injection.parameter = "id"
kb.technique = PAYLOAD.TECHNIQUE.ERROR
kb.injection.data = {PAYLOAD.TECHNIQUE.ERROR: _make_vector()}
# With testMode=False, getIdentifiedDbms() prefers conf.dbmsHandler._dbms and conf.forceDbms
# over the forced DBMS below; a leaked handler/option (e.g. MSSQL) would make the chunk-length
# probe emit REPLICATE (not REPEAT) and the oracle mis-detect length 0. Clear both to isolate.
conf.dbmsHandler = None
conf.forceDbms = None
set_dbms("MySQL")
def tearDown(self):
@ -157,6 +163,8 @@ class TestErrorChunkLengthHex(unittest.TestCase):
kb.injection.place, kb.injection.parameter, kb.injection.data = self._saved["inj"]
Connect.queryPage = self._saved["qp"]
eu.Request.queryPage = self._saved["qp"]
conf.dbmsHandler = self._saved["dbmsHandler"]
conf.forceDbms = self._saved["forceDbms"]
def _install_oracle(self, secret="hello"):
cap = self.CAP