mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-29 19:09:02 +00:00
important fix for a bug reported by x <deep_freeze@mail.ru> (along with normal fixes, getUnicode now uses kb.pageEncoding)
This commit is contained in:
@@ -1510,10 +1510,8 @@ def getUnicode(value, encoding=None):
|
||||
u'1'
|
||||
"""
|
||||
|
||||
if encoding is None:
|
||||
encoding = conf.dataEncoding if 'dataEncoding' in conf else "utf-8"
|
||||
if isinstance(value, basestring):
|
||||
return value if isinstance(value, unicode) else unicode(value, encoding, errors='replace')
|
||||
return value if isinstance(value, unicode) else unicode(value, encoding or kb.pageEncoding or "utf-8", errors='replace')
|
||||
else:
|
||||
return unicode(value) # encoding ignored for non-basestring instances
|
||||
|
||||
|
||||
@@ -1183,6 +1183,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||
kb.osVersion = None
|
||||
kb.osSP = None
|
||||
|
||||
kb.pageEncoding = "utf-8"
|
||||
kb.pageStable = None
|
||||
kb.partRun = None
|
||||
kb.proxyAuthHeader = None
|
||||
|
||||
Reference in New Issue
Block a user