Fork me on GitHub
#sci
<
2021-09-08
>
xlfe23:09:42

I'd like to use sci/eval-string or sci/read-string to parse an edn string back into native datastructures. this includes user provided input, so I'm wondering how to make it as "safe" as possible. I thought I could try and disallow any symbol usage - ie just parse the data - but the following works

(sci/eval-string "(hash-map :2 1)" {:allow '[]})

xlfe23:09:01

should I just clojure.edn/read-string ?

borkdude05:09:35

Yeah, why not?

👍 2