We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64403a1 commit bfc837dCopy full SHA for bfc837d
1 file changed
smartcalc/main.py
@@ -23,7 +23,7 @@ def index_protected():
23
else:
24
text = request.form['formula']
25
try:
26
- result = eval(text)
+ result = eval(text, {'__builtins__': {}})
27
except (SyntaxError, NameError):
28
result = 'Error: wrong input'
29
return render_template('index.html', result=result, text=text)
0 commit comments