From 0e9b3d652be203e48fc92727123244942c7536e1 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Sat, 9 Sep 2017 18:13:52 +0200 Subject: [PATCH] patch out eval() from libs/ace/worker-javascript.js --- copy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/copy.sh b/copy.sh index 6499c3c..01536e5 100755 --- a/copy.sh +++ b/copy.sh @@ -7,4 +7,8 @@ for i in ace mode-javascript theme-chrome theme-tomorrow worker-javascript do cp node_modules/ace-builds/src/${i}.js libs/ace/ done -cp node_modules/ace-builds/LICENSE node_modules/ace-builds/README.md libs/ace/ \ No newline at end of file +cp node_modules/ace-builds/LICENSE node_modules/ace-builds/README.md libs/ace/ + +# Patch out eval() +sed -e 's/eval("throw 0;" + str);/return true;/g' libs/ace/worker-javascript.js > tmp.js +mv tmp.js libs/ace/worker-javascript.js \ No newline at end of file