[issue37418] Code execution without calling it
Emilio López Arias
report at bugs.python.org
Wed Jun 26 14:57:03 EDT 2019
New submission from Emilio López Arias <milio81 at gmail.com>:
Create a new python file: example.py
------------------------------------
def my_decorator(f):
print("before")
f()
print("after")
@my_decorator
def my_function():
print("hello world")
------------------------------------
If you execute the file example.py you should see some output you shouldn't:
(base) C:\Users\emilio\curso_python>python --version
Python 3.7.3
(base) C:\Users\emilio\curso_python>python ejemplo.py
before
hello world
after
----------
messages: 346661
nosy: Emilio López Arias
priority: normal
severity: normal
status: open
title: Code execution without calling it
type: security
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37418>
_______________________________________
More information about the Python-bugs-list
mailing list