Skip to content

Commit 940c020

Browse files
authored
Reject unicode digits for Python implementation of json.loads()
1 parent a0f5c8e commit 940c020

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/json/scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
__all__ = ['make_scanner']
1010

1111
NUMBER_RE = re.compile(
12-
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
12+
r'(-?(?:0|[1-9][0-9]*))(\.[0-9]+)?([eE][-+]?[0-9]+)?',
1313
(re.VERBOSE | re.MULTILINE | re.DOTALL))
1414

1515
def py_make_scanner(context):

0 commit comments

Comments
 (0)