I've just been trying out Clojail, and ran into a difficulty.  Suppose
you make a sandbox:

(def sb (sandbox secure-tester))

and you want to dynamically assemble function calls to run inside the
sandbox.  Well, the sandbox takes a quoted expression, so you do
something like this:

(defn function-sandbox [func inputs]
  (map (fn [inp] (sb `(~func ~inp))) inputs))

and try:

(function-sandbox inc [1 2 3])

but:

RuntimeException EvalReader not allowed when *read-eval* is false.
clojure.lang.Util.runtimeException

Naturally, eval is disallowed by the sandbox.

All the examples in the docs show using the sandbox with a literal
quoted expression; how do you use it with expressions assembled at
runtime?

Thanks,

Nick.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to