Reputation: 2740
I want users to be able to submit a code to a server where it would be executed. In order to secure it, I want to specify a list of functions and macros that are approved - a user execution scope. So I am wondering whether something like this is possible in clojure. Is there any easy way how to do it or are there any libraries that help with it?
My first idea was to iterate over the submitted code snippet and check that all the symbols in there are actually allowed. But then I realized that one can easily turn a string or anything into a symbol using a code. So this approach isn't the best in general.
Upvotes: 1
Views: 77