Minor bug fix

This commit is contained in:
Miroslav Štampar 2026-06-15 18:17:31 +02:00
parent 7c401cab64
commit c210daca04
3 changed files with 7 additions and 7 deletions

View file

@ -1839,7 +1839,7 @@ def escapeJsonValue(value):
retVal = ""
for char in value:
if char < ' ' or char == '"':
if char < ' ' or char in ('"', '\\'): # Note: backslash must be escaped too, otherwise a '\' in the value corrupts the surrounding JSON string
retVal += json.dumps(char)[1:-1]
else:
retVal += char
@ -3703,8 +3703,8 @@ def unArrayizeValue(value):
if isListLike(value):
if not value:
value = None
elif len(value) == 1 and not isListLike(value[0]):
value = value[0]
elif len(value) == 1 and not isListLike(next(iter(value))): # Note: next(iter(...)) not value[0] - a set/OrderedSet is list-like but not subscriptable
value = next(iter(value))
else:
value = [_ for _ in flattenValue(value) if _ is not None]
value = value[0] if len(value) > 0 else None

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.6.112"
VERSION = "1.10.6.113"
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)