[Ecls-list] -shell and -load difference

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Thu Oct 18 08:00:56 UTC 2007


2007/10/18, Erik Huelsmann <ehuels at gmail.com>:
> >
> > PS
> > ...Is there a way to run CL code from strings within ECL without writing
> > and reading a temporary file (this would just be a nicety since it works
> > fine as is)?
>
> Yes and it works on all CLs:
>
> (defun eval-string (your-code)
>   (eval (read-from-string your-code)))

This is probably not your problem, but if you are to evaluate
arbitrary strings coming from an email, I would set up two security
measures: one is to ensure that only authorized emails run the code
and the other one to set up a safe environment for _reading_ the lisp
objects from the string. Ideally you would set up a package where
there is no access to system symbols and maybe some functions have
been removed. You might even want to deactivate #.  the reader macro
for executing code.

Juanjo

-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list