mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-12 02:01:25 -10:00
important fix for a bug reported by x <[email protected]> (along with normal fixes, getUnicode now uses kb.pageEncoding)
This commit is contained in:
1 parent
572f403069
commit
08ccbf2c1e
5 files changed
+22
-16
No files matched your search
+1
-3
@@ -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