mirror of
https://github.com/pretix/pretix.git
synced 2026-10-02 19:24:42 +00:00
Prevent parsing non-standard-compliant JSON float values (Z#23245937 / PRT-021)
This commit is contained in:
committed by
Raphael Michel
parent
d8fe665798
commit
81e004e6c8
@@ -251,6 +251,13 @@ def monkeypatch_reportlab_imagereader():
|
||||
utils.ImageReader.__init__ = new_init
|
||||
|
||||
|
||||
def monkeypatch_json_constants():
|
||||
from json.decoder import _CONSTANTS # noqa
|
||||
del _CONSTANTS['-Infinity']
|
||||
del _CONSTANTS['Infinity']
|
||||
del _CONSTANTS['NaN']
|
||||
|
||||
|
||||
def monkeypatch_all_at_ready():
|
||||
monkeypatch_vobject_performance()
|
||||
monkeypatch_pillow_safer()
|
||||
@@ -258,3 +265,4 @@ def monkeypatch_all_at_ready():
|
||||
monkeypatch_urllib3_ssrf_protection()
|
||||
monkeypatch_cookie_morsel()
|
||||
monkeypatch_reportlab_imagereader()
|
||||
monkeypatch_json_constants()
|
||||
|
||||
Reference in New Issue
Block a user