-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Request:
Remove use of the exec
function in the electricpy.sim
module:
tempQstr += ")"
if any(P_strgs[ii:i]):
if verbose: print("Full P-Func Str:",tempPstr)
exec(tempPstr)
if any(Q_strgs[ii:i]):
if verbose: print("Full Q-Func Str:",tempQstr)
exec(tempQstr)
ii = i # Increase Lower Index
retset = (P_funcs,Q_funcs)
Reason:
Python's exec
function is invariably a bit risky, and introduces the opportunity for malicious misuse of code. Though unlikely, it's always possible for some cleverly crafted strings be used to execute arbitrary code. I can't think of a particular way this could be exploited today, but just because I can't think of a way it might be done doesn't mean someone else won't, either.
References:
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request