Safe eval?

Paul Rubin phr-n2002a at nightsong.com
Tue Apr 16 16:58:01 EDT 2002


"Philipp Lenssen" <lenssen at hitnet.rwth-aachen.de> writes:
> Is it possible to have a safe eval() on the server-side even when the string
> consists of submitted user data?

Well, look at the docs for the rexec (restricted execution) and Bastion
classes, but basically no, there's no safe way.  Rexec doesn't stop an
infinite loop from hosing your cpu.

Why do you want to eval strings from untrusted users?




More information about the Python-list mailing list