As the title shows, if you try to enter a statement in the flag pre_dispatch, it will run whatever you want to run.
This should present a potential security vulnerability.
def f():
return 1
p = Parallel(n_jobs=3, pre_dispatch="sys.exit(0)")
p(delayed(f)() for i in range(10)) # this will cause the system to exit
|
pre_dispatch = eval(pre_dispatch) |