Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions app/routes/contributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down