mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-12 02:22:55 +00:00
Fixing CI/CD errors
This commit is contained in:
+1
-1
@@ -184,7 +184,7 @@ def _serializeDecode(struct):
|
||||
# that would surface as 'bytes' and break str consumers - most visibly kb.chars,
|
||||
# whose str-key lookups then return None and crash cleanupPayload(). Recover such
|
||||
# cross-version TEXT by decoding valid UTF-8 to 'str'; real binary stays bytes.
|
||||
if struct.get("pv") == 3:
|
||||
if struct.get("pv") == 3 or not six.PY3:
|
||||
return raw
|
||||
try:
|
||||
return raw.decode("utf-8")
|
||||
|
||||
@@ -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.108"
|
||||
VERSION = "1.10.7.109"
|
||||
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)
|
||||
|
||||
@@ -24,6 +24,7 @@ bootstrap()
|
||||
|
||||
from lib.core.common import (getFilteredPageContent, getPageWordSet,
|
||||
extractTextTagContent, parseSqliteTableSchema)
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
|
||||
|
||||
@@ -60,8 +61,14 @@ class TestExtractTextTagContent(unittest.TestCase):
|
||||
|
||||
class TestParseSqliteTableSchema(unittest.TestCase):
|
||||
def setUp(self):
|
||||
# parseSqliteTableSchema keys cachedColumns by conf.db/conf.tbl - reset them (not just
|
||||
# cachedColumns) so a leaked db/tbl from a prior test can't shift the storage key and
|
||||
# break this test's [None][None] lookup (order-dependent flake under PyPy discovery)
|
||||
self.addCleanup(setattr, kb.data, "cachedColumns", kb.data.get("cachedColumns"))
|
||||
self.addCleanup(setattr, conf, "db", conf.get("db"))
|
||||
self.addCleanup(setattr, conf, "tbl", conf.get("tbl"))
|
||||
kb.data.cachedColumns = {}
|
||||
conf.db = conf.tbl = None
|
||||
|
||||
def _cols(self):
|
||||
# parseSqliteTableSchema stores under cachedColumns[db][table] (both None here)
|
||||
|
||||
Reference in New Issue
Block a user