mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
[3.13] gh-125682: Reject non-ASCII digits in the Python implementation of JSON decoder (GH-125687) (GH-125692)
(cherry picked from commit d358425e69
)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
This commit is contained in:
parent
014d0ee341
commit
6715afe349
3 changed files with 9 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue