cpython/Lib/encodings
Gregory P. Smith d315722564
gh-98433: Fix quadratic time idna decoding. (#99092)
There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

This also adds an early length check in IDNA decoding to outright reject
huge inputs early on given the ultimate result is defined to be 63 or fewer
characters.
2022-11-07 16:54:41 -08:00
..
__init__.py bpo-46659: Fix the MBCS codec alias on Windows (GH-31218) 2022-02-22 22:04:07 +01:00
aliases.py bpo-34519: Add additional aliases for HP Roman 8 (GH-8956) 2019-09-11 14:08:41 +01:00
ascii.py
base64_codec.py #7475: Remove references to '.transform' from transform codec docstrings. 2014-03-13 20:54:30 -04:00
big5.py
big5hkscs.py
bz2_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
charmap.py
cp037.py Add fast-path in PyUnicode_DecodeCharmap() for pure 8 bit encodings: 2013-04-09 21:53:09 +02:00
cp273.py #1097797: Add CP273 codec, and exercise it in the test suite 2013-11-10 13:44:30 -05:00
cp424.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp437.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp500.py Add fast-path in PyUnicode_DecodeCharmap() for pure 8 bit encodings: 2013-04-09 21:53:09 +02:00
cp720.py Merged revisions 78806 via svnmerge from 2010-03-08 22:17:58 +00:00
cp737.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp775.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp850.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp852.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp855.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp856.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp857.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp858.py Merged revisions 81499,81506 via svnmerge from 2010-06-27 22:41:29 +00:00
cp860.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp861.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp862.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp863.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp864.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp865.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp866.py Fixed incorrectly applying a patch for issue19668. 2013-11-23 19:50:47 +02:00
cp869.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp874.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp875.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp932.py
cp949.py
cp950.py
cp1006.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1026.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1125.py Fixed incorrectly applying a patch for issue19668. 2013-11-23 19:50:47 +02:00
cp1140.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1250.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1251.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1252.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1253.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1254.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1255.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1256.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1257.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1258.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
euc_jis_2004.py
euc_jisx0213.py
euc_jp.py
euc_kr.py
gb2312.py
gb18030.py
gbk.py
hex_codec.py #7475: Remove references to '.transform' from transform codec docstrings. 2014-03-13 20:54:30 -04:00
hp_roman8.py Add some "used with permission" mentions where external resources are referenced. 2016-01-15 09:53:51 -08:00
hz.py
idna.py gh-98433: Fix quadratic time idna decoding. (#99092) 2022-11-07 16:54:41 -08:00
iso2022_jp.py
iso2022_jp_1.py
iso2022_jp_2.py
iso2022_jp_3.py
iso2022_jp_2004.py
iso2022_jp_ext.py
iso2022_kr.py
iso8859_1.py Add fast-path in PyUnicode_DecodeCharmap() for pure 8 bit encodings: 2013-04-09 21:53:09 +02:00
iso8859_2.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_3.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_4.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_5.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_6.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_7.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_8.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_9.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_10.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_11.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_13.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_14.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_15.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_16.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
johab.py
koi8_r.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
koi8_t.py Added forgotten new files for issues #22681 and #22682. 2015-05-13 00:34:53 +03:00
koi8_u.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
kz1048.py Added forgotten new files for issues #22681 and #22682. 2015-05-13 00:34:53 +03:00
latin_1.py
mac_arabic.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_croatian.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_cyrillic.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_farsi.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_greek.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_iceland.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_latin2.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
mac_roman.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_romanian.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_turkish.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mbcs.py
oem.py Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup 2016-09-06 19:42:27 -07:00
palmos.py Normalize whitespace 2012-06-16 22:50:54 +02:00
ptcp154.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
punycode.py bpo-30566: Fix IndexError when using punycode codec (GH-18632) 2020-02-25 06:19:03 +03:00
quopri_codec.py Issue #16473: Fix byte transform codec documentation; test quotetabs=True 2015-09-12 00:34:28 +00:00
raw_unicode_escape.py bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) 2021-10-14 20:04:19 +03:00
rot_13.py bpo-32943: Fix confusing error message for rot13 codec (GH-5869) 2018-03-25 12:09:21 +08:00
shift_jis.py
shift_jis_2004.py
shift_jisx0213.py
tis_620.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
undefined.py
unicode_escape.py bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) 2021-10-14 13:17:00 +03:00
utf_7.py Merged revisions 59056-59076 via svnmerge from 2007-11-20 23:38:09 +00:00
utf_8.py
utf_8_sig.py Merged revisions 59041-59055 via svnmerge from 2007-11-19 18:03:44 +00:00
utf_16.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
utf_16_be.py
utf_16_le.py
utf_32.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
utf_32_be.py Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le and 2007-08-16 21:55:45 +00:00
utf_32_le.py Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le and 2007-08-16 21:55:45 +00:00
uu_codec.py bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (#17418) 2019-12-02 14:25:21 -08:00
zlib_codec.py #7475: Remove references to '.transform' from transform codec docstrings. 2014-03-13 20:54:30 -04:00