mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 14:11:29 +00:00
Fixes #4020
This commit is contained in:
@@ -231,6 +231,11 @@ def getBytes(value, encoding=UNICODE_ENCODING, errors="strict", unsafe=True):
|
||||
|
||||
retVal = value
|
||||
|
||||
try:
|
||||
codecs.lookup(encoding)
|
||||
except LookupError:
|
||||
encoding = UNICODE_ENCODING
|
||||
|
||||
if isinstance(value, six.text_type):
|
||||
if INVALID_UNICODE_PRIVATE_AREA:
|
||||
if unsafe:
|
||||
@@ -391,4 +396,4 @@ def getConsoleLength(value):
|
||||
else:
|
||||
retVal = len(value)
|
||||
|
||||
return retVal
|
||||
return retVal
|
||||
|
||||
Reference in New Issue
Block a user