mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
Minor just in case patch (error set in case of --string)
This commit is contained in:
parent
cb1b5d30fd
commit
8cef17b583
4 changed files with 19 additions and 8 deletions
|
|
@ -106,9 +106,9 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
|
|||
# Preventing "Unicode equal comparison failed to convert both arguments to Unicode"
|
||||
# (e.g. if one page is PDF and the other is HTML)
|
||||
if isinstance(seqMatcher.a, str) and isinstance(page, unicode):
|
||||
page = page.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, 'ignore')
|
||||
page = page.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore")
|
||||
elif isinstance(seqMatcher.a, unicode) and isinstance(page, str):
|
||||
seqMatcher.a = seqMatcher.a.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, 'ignore')
|
||||
seqMatcher.a = seqMatcher.a.encode(kb.pageEncoding or DEFAULT_PAGE_ENCODING, "ignore")
|
||||
|
||||
if seqMatcher.a and page and seqMatcher.a == page:
|
||||
ratio = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue