diff --git a/app/routes/contributions.js b/app/routes/contributions.js index 7f68170b94..cccd91d941 100644 --- a/app/routes/contributions.js +++ b/app/routes/contributions.js @@ -27,11 +27,10 @@ function ContributionsHandler(db) { this.handleContributionsUpdate = (req, res, next) => { - /*jslint evil: true */ - // Insecure use of eval() to parse inputs - const preTax = eval(req.body.preTax); - const afterTax = eval(req.body.afterTax); - const roth = eval(req.body.roth); + // Fix for A1 - SSJS Injection: parse inputs as integers instead of eval() + const preTax = parseInt(req.body.preTax, 10); + const afterTax = parseInt(req.body.afterTax, 10); + const roth = parseInt(req.body.roth, 10); /* //Fix for A1 -1 SSJS Injection attacks - uses alternate method to eval