News for hackers. Stuff that matters.
Re:Clojure's Default Reader is Unsafe by baq on Friday March 08, 2013 @10:46AM (#5343999)
executing code you didn't write is unsecure. news at 11.

...am i missing something? isn't this the same problem as with evaling json in javascript?

Re:Clojure's Default Reader is Unsafe by djpowell on Friday March 08, 2013 @10:53AM (#5344039)
Lisps separate the notion of reading strings into data structures, from evaluating those data structures. So it would be easy to assume that read-string was safe to use, but there were actually some lesser-known features in the Clojure reader that allowed code execution.
Re:Clojure's Default Reader is Unsafe by praptak on Friday March 08, 2013 @10:58AM (#5344075)
No, it would be somewhat analogous a json parser that doesn't only return a passive data struct but also executes arbitrary code.
Re:Clojure's Default Reader is Unsafe by martinced on Friday March 08, 2013 @11:17AM (#5344171)
You're missing that the whole point here is that when read-eval is set to false then, precisely, you're making your intent very clear: you do NOT want to execute code you didn't write.

The problem is that there's a hole due to Java constructors being called (even when read-eval is set to false).