eval is evil #19

nemeria opened this Issue Feb 5, 2013 · 2 comments


None yet

3 participants



I updated to beta2 and i noticed that po files are no more supported, only json are... Not a good suprise but anyway...

As I already have a complex buildchain, i don't use your "bin/compilers", I use the last po2json lib to convert my po files to json.
Eval function is evil for many reasons and should not be used in that case because you just want to parse the json to an object and JSON.parse() is here for that.

your block near line 82 would just be :
var json_locale_data = JSON.parse(fs.readFileSync(json_file_path(l)).toString());

@ozten ozten added a commit that referenced this issue Feb 6, 2013
@ozten ozten Removing use of eval. Fixes Issue #19
A more robust fix needs to be coordinated in mozilla/browserid
as well as Issue #15.
Mozilla member

Fixed in commit 648dec4e203fbe93ea99cb7718b5106be9a30c82

A more robust fix is to switch to proper JSON files and to fix browserid's toolchaining to use JSON files and convert them to JavaScript files as needed.

@ozten ozten closed this Feb 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment