summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_json/test_decode.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)Gregory P. Smith2022-09-021-0/+9
| | | | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002 Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
* bpo-39377: json: Remove the encoding option. (GH-18075)Inada Naoki2020-01-201-4/+0
|
* bpo-33461: emit DeprecationWarning when json.loads(encoding=...) is used ↵Matthias Bussonnier2019-04-091-0/+4
| | | | (GH-6762)
* bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)Serhiy Storchaka2018-05-221-1/+3
|
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+1
| | | Make also minor PEP8 coding style fixes on modified imports.
* Issue #17909: Accept binary input in json.loadsNick Coghlan2016-09-101-3/+1
| | | | | | | json.loads (and hence json.load) now support binary input encoded as UTF-8, UTF-16 or UTF-32. Patch by Serhiy Storchaka.
* Issue #27993: Fix problems with plural objects in docs and commentsMartin Panter2016-09-071-1/+1
|
* Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError.Serhiy Storchaka2015-01-261-4/+4
|
* merge 3.3Benjamin Peterson2014-04-141-0/+4
|\
| * merge 3.2Benjamin Peterson2014-04-141-0/+4
| |
* | #18958: Improve error message for json.load(s) while passing a string that ↵Ezio Melotti2013-10-201-0/+14
| | | | | | | | starts with a UTF-8 BOM.
* | #19307: Improve error message for json.load(s) while passing objects of the ↵Ezio Melotti2013-10-201-1/+8
|/ | | | wrong type.
* #18273: move the tests in Lib/test/json_tests to Lib/test/test_json and make ↵Ezio Melotti2013-08-081-0/+74
them discoverable by unittest. Patch by Zachary Ware.