Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
While reviewing#125652 and reading the documentation ofint(), I realised this condition injson.decoder is insufficient:
Line 61 inf203d1c
| iflen(esc)==4andesc[1]notin'xX': |
>>>importsys>>>sys.modules["_json"]=None>>>importjson>>>json.loads(r'["\u 000", "\u-000", "\u+000", "\u0_00"]')['\x00','\x00','\x00','\x00']
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs
- gh-125660: Python implementation of
json.loads()accepts invalid unicode escapes #125683 - [3.13] gh-125660: Reject invalid unicode escapes for Python implementation of JSON decoder (GH-125683) #125694
- [3.12] gh-125660: Reject invalid unicode escapes for Python implementation of JSON decoder (GH-125683) #125695
Metadata
Metadata
Assignees
Labels
Projects
Status
Done