diff --git a/lib/core/common.py b/lib/core/common.py index fe7ba906b..3f643e992 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1270,9 +1270,11 @@ def sanitizeStr(value): >>> sanitizeStr('foo\\n\\rbar') == 'foo bar' True + >>> sanitizeStr(None) == 'None' + True """ - return getUnicode(value).replace("\n", " ").replace("\r", "") if value else value + return getUnicode(value).replace("\n", " ").replace("\r", "") def getHeader(headers, key): """ diff --git a/lib/core/convert.py b/lib/core/convert.py index ec338eb4b..d48bdfee8 100644 --- a/lib/core/convert.py +++ b/lib/core/convert.py @@ -330,6 +330,8 @@ def getUnicode(value, encoding=None, noneToNull=False): True >>> getUnicode(1) == u'1' True + >>> getUnicode(None) == 'None' + True """ if noneToNull and value is None: diff --git a/lib/core/settings.py b/lib/core/settings.py index fec293570..a2235b6f5 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.5.1.7" +VERSION = "1.5.1.8" 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)