Skip to content Skip to sidebar Skip to footer
Showing posts with the label Sandbox

Python Eval(compile(...), Sandbox), Globals Go In Sandbox Unless In Def, Why?

Consider the following: def test(s): globals()['a'] = s sandbox = {'test': tes… Read more Python Eval(compile(...), Sandbox), Globals Go In Sandbox Unless In Def, Why?

Evaluate Math Equations From Unsafe User Input In Python

I have a website where the user enters math equations (expressions) and then those equations are ev… Read more Evaluate Math Equations From Unsafe User Input In Python