Skip to content

Commit

Permalink
Add example vuln for CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pickford-snyk committed May 25, 2023
1 parent a2cbf44 commit b3b4770
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions example-vuln.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2014-2022 Bjoern Kimminich & the OWASP Juice Shop contributors.
* SPDX-License-Identifier: MIT
*/

import models = require('../models/index')
import { Request, Response } from 'express'

const utils = require('../lib/utils')

exports.getRecycleItem = () => (req: Request, res: Response) => {
models.Recycle.findAll({
where: {
id: JSON.parse(req.params.id)
}
}).then((Recycle) => {
return res.send(utils.queryResultToJson(Recycle))
})
}

exports.blockRecycleItems = () => (req: Request, res: Response) => {
const errMsg = { err: 'Sorry, this endpoint is not supported.' }
return res.send(utils.queryResultToJson(errMsg))
}

0 comments on commit b3b4770

Please sign in to comment.