mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-28 04:20:58 +00:00
Fixes CI/CD tests
This commit is contained in:
parent
03b44ed2f1
commit
9d8c1021f3
3 changed files with 21 additions and 9 deletions
|
|
@ -189,7 +189,7 @@ ccc4a717e887652b1fcce073d9409d9c59a3b28548c703a9e453d15845f90cd7 lib/core/patch
|
|||
48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py
|
||||
0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py
|
||||
888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py
|
||||
4ea19be3a4d0846babbb6ba273d0f590d34e9e97a094184f3507c02882a5e389 lib/core/settings.py
|
||||
82767887306a66ba4b1b2c254068225196f3adb434bfac2929a123c51fdd45f8 lib/core/settings.py
|
||||
cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py
|
||||
bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py
|
||||
70ea3768f1b3062b22d20644df41c86238157ec80dd43da40545c620714273c6 lib/core/target.py
|
||||
|
|
@ -607,7 +607,7 @@ a6d013104601c0414628aff3d8b5b69bee3e6733781d8f8da880457d8b44bd3a tests/test_pro
|
|||
cec98d72992c0799229a780fa7f0d7f3fb01ec2d708187ce0e4a05c8612f291b tests/test_safe2bin.py
|
||||
a1c6cda1e5b483f61e6a4f8ddd0b06a15ddaa3fd2119bfb9dbd9cc970d7a751d tests/test_settings_regex.py
|
||||
d3d991331096e16e5019de3d652e9fff92c09bd9f97c50b1c2c3ceb0ed49b17e tests/test_sqlparse.py
|
||||
41907c873663401f979b87eaff3efc8d52e0ce96cbe1eef7aa70c6d3af8cd5cf tests/test_strings.py
|
||||
8bcbf1091134dd0a62f6201f8b3645ed87b5ff2f7ba40a87231a29dac412591f tests/test_strings.py
|
||||
f3a628db8a3e05baee580c02132e95b164695e4b3ee1785707e3ea148702449a tests/test_tamper.py
|
||||
b3e13febe9e0ff6f97334f2868655bfdbaa18755e464a6dc4c6d424f513bad02 tests/test_targeturl.py
|
||||
639851dc68f62b559b200b09c308e64e453f414969940005bac75dc0ab07a6b6 tests/test_texthelpers.py
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.6.138"
|
||||
VERSION = "1.10.6.139"
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -90,12 +90,24 @@ class TestMiscStrings(unittest.TestCase):
|
|||
self.assertEqual(longestCommonPrefix("abc", "xyz"), "")
|
||||
|
||||
def test_decodeIntToUnicode(self):
|
||||
# single-byte code points map to their char
|
||||
self.assertEqual(decodeIntToUnicode(65), u"A")
|
||||
self.assertEqual(decodeIntToUnicode(97), u"a")
|
||||
# NOTE: >255 ints are interpreted as a multi-byte sequence (not a Unicode code point),
|
||||
# e.g. 0x2122 -> bytes 0x21 0x22 -> '!"' (documents actual behavior, not an assumption)
|
||||
self.assertEqual(decodeIntToUnicode(0x2122), u'!"')
|
||||
from lib.core.common import Backend
|
||||
from lib.core.data import kb
|
||||
|
||||
# decodeIntToUnicode() is back-end DBMS dependent (e.g. PostgreSQL/Oracle/SQLite
|
||||
# treat >255 values as Unicode code points). Pin a clean, no-forced-DBMS state so
|
||||
# the result is deterministic regardless of test execution order (a prior dialect
|
||||
# test may otherwise leave a forced DBMS set); restore it afterwards.
|
||||
_saved = (kb.get("forcedDbms"), kb.get("stickyDBMS"))
|
||||
Backend.flushForcedDbms(force=True)
|
||||
try:
|
||||
# single-byte code points map to their char
|
||||
self.assertEqual(decodeIntToUnicode(65), u"A")
|
||||
self.assertEqual(decodeIntToUnicode(97), u"a")
|
||||
# NOTE: with no identified DBMS, >255 ints are interpreted as a multi-byte
|
||||
# sequence (not a Unicode code point), e.g. 0x2122 -> bytes 0x21 0x22 -> '!"'
|
||||
self.assertEqual(decodeIntToUnicode(0x2122), u'!"')
|
||||
finally:
|
||||
kb.forcedDbms, kb.stickyDBMS = _saved
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue