diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-10-18 12:26:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-18 12:26:29 (GMT) |
commit | d358425e6968858e52908794d15f37e62abc74ec (patch) | |
tree | 309384b237287d58261ea7f7d5b0a054b35afc24 /Lib/json | |
parent | a0f5c8e6272a1fd5422892d773923b138e77ae5f (diff) | |
download | cpython-d358425e6968858e52908794d15f37e62abc74ec.zip cpython-d358425e6968858e52908794d15f37e62abc74ec.tar.gz cpython-d358425e6968858e52908794d15f37e62abc74ec.tar.bz2 |
gh-125682: Reject non-ASCII digits in the Python implementation of JSON decoder (GH-125687)
Diffstat (limited to 'Lib/json')
-rw-r--r-- | Lib/json/scanner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/json/scanner.py b/Lib/json/scanner.py index 7a61cfc..0908975 100644 --- a/Lib/json/scanner.py +++ b/Lib/json/scanner.py @@ -9,7 +9,7 @@ except ImportError: __all__ = ['make_scanner'] NUMBER_RE = re.compile( - r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', + r'(-?(?:0|[1-9][0-9]*))(\.[0-9]+)?([eE][-+]?[0-9]+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scanner(context): |