Skip to content

Commit

Permalink
Merge pull request OWASP#204 from karlhorky/patch-1
Browse files Browse the repository at this point in the history
Fix NoSQL injection solution
  • Loading branch information
lirantal authored Jul 9, 2020
2 parents 823d27b + 38de373 commit 58cbbe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/data/allocations-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const AllocationsDAO = function(db){
const parsedThreshold = parseInt(threshold, 10);
if (parsedThreshold >= 0 && parsedThreshold <= 99) {
return {$where: `this.userId == ${parsedUserId} && this.stocks > ${threshold}`};
return {$where: `this.userId == ${parsedUserId} && this.stocks > ${parsedThreshold}`};
}
throw `The user supplied threshold: ${parsedThreshold} was not valid.`;
*/
Expand Down

0 comments on commit 58cbbe2

Please sign in to comment.