From 2b8aaa53759f4f6168f6572dbda79092b2517437 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 18 May 2021 21:12:45 +0530 Subject: [PATCH] fix(minor): expose limited methods of json module --- frappe/utils/safe_exec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 6c1fa21685..2472de70f0 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -61,7 +61,9 @@ def get_safe_globals(): out = NamespaceDict( # make available limited methods of frappe - json=json, + json=NamespaceDict( + loads = json.loads, + dumps = json.dumps), dict=dict, log=frappe.log, _dict=frappe._dict,