Skip to content

Commit b51b80b

Browse files
committed
Fix for a privately reported bug
1 parent e4b0ac9 commit b51b80b

3 files changed

Lines changed: 25 additions & 21 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from lib.core.revision import getRevisionNumber
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.0.10.19"
23+
VERSION = "1.0.10.20"
2424
REVISION = getRevisionNumber()
2525
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2626
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}

thirdparty/beautifulsoup/beautifulsoup.py

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -512,25 +512,29 @@ def _convertEntities(self, match):
512512
entities with the appropriate Unicode characters. If HTML
513513
entities are being converted, any unrecognized entities are
514514
escaped."""
515-
x = match.group(1)
516-
if self.convertHTMLEntities and x in name2codepoint:
517-
return unichr(name2codepoint[x])
518-
elif x in self.XML_ENTITIES_TO_SPECIAL_CHARS:
519-
if self.convertXMLEntities:
520-
return self.XML_ENTITIES_TO_SPECIAL_CHARS[x]
521-
else:
522-
return u'&%s;' % x
523-
elif len(x) > 0 and x[0] == '#':
524-
# Handle numeric entities
525-
if len(x) > 1 and x[1] == 'x':
526-
return unichr(int(x[2:], 16))
527-
else:
528-
return unichr(int(x[1:]))
515+
try:
516+
x = match.group(1)
517+
if self.convertHTMLEntities and x in name2codepoint:
518+
return unichr(name2codepoint[x])
519+
elif x in self.XML_ENTITIES_TO_SPECIAL_CHARS:
520+
if self.convertXMLEntities:
521+
return self.XML_ENTITIES_TO_SPECIAL_CHARS[x]
522+
else:
523+
return u'&%s;' % x
524+
elif len(x) > 0 and x[0] == '#':
525+
# Handle numeric entities
526+
if len(x) > 1 and x[1] == 'x':
527+
return unichr(int(x[2:], 16))
528+
else:
529+
return unichr(int(x[1:]))
529530

530-
elif self.escapeUnrecognizedEntities:
531-
return u'&amp;%s;' % x
532-
else:
533-
return u'&%s;' % x
531+
elif self.escapeUnrecognizedEntities:
532+
return u'&amp;%s;' % x
533+
534+
except ValueError: # e.g. ValueError: unichr() arg not in range(0x10000)
535+
pass
536+
537+
return u'&%s;' % x
534538

535539
def __init__(self, parser, name, attrs=None, parent=None,
536540
previous=None):

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
77760b7e2abbd21cf6b95234d698078b lib/core/settings.py
48+
2198a75694fe7bff1fe9dd0391f27358 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@@ -276,7 +276,7 @@ a5f02f75856551499c0bf33672869a7f tamper/versionedkeywords.py
276276
99a90d668f367f5660698c00e84ec671 tamper/xforwardedfor.py
277277
368165b45dadcdff4422bc010700832a thirdparty/ansistrm/ansistrm.py
278278
d41d8cd98f00b204e9800998ecf8427e thirdparty/ansistrm/__init__.py
279-
a53a7a876b401aaaa3535376676692ae thirdparty/beautifulsoup/beautifulsoup.py
279+
8e775c25bc9e84891ad6fcb4f0005c23 thirdparty/beautifulsoup/beautifulsoup.py
280280
cb2e1fe7c404dff41a2ae9132828f532 thirdparty/beautifulsoup/__init__.py
281281
ff54a1d98f0ab01ba7b58b068d2ebd26 thirdparty/bottle/bottle.py
282282
4528e6a7bb9341c36c425faf40ef32c3 thirdparty/bottle/__init__.py

0 commit comments

Comments
 (0)