From fd740b780b06764299ac2c8d4b682f61385d0a00 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 21 Aug 2023 12:07:06 +0530 Subject: [PATCH] fix: use vanilla eval --- frappe/commands/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index bdddad8cf6..9a0a6113b8 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -254,9 +254,8 @@ def execute(context, method, args=None, kwargs=None, profile=False): try: ret = frappe.get_attr(method)(*args, **kwargs) except Exception: - ret = frappe.safe_eval( - method + "(*args, **kwargs)", eval_globals=globals(), eval_locals=locals() - ) + # eval is safe here because input is from console + ret = eval(method + "(*args, **kwargs)", globals(), locals()) # nosemgrep if profile: import pstats