Skip to content

Commit f2f3e4e

Browse files
add new endpoint function
1 parent d8781e5 commit f2f3e4e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

routes/xss-vulnerable.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ const { startVulnerableResponse } = require('../service/xssResponder');
1717

1818
// UNSAFE: Direct XSS vulnerability - matches pattern Snyk detects
1919
// This is a simple reflected XSS that Snyk should flag
20-
// router.get('/', (req, res) => {
21-
// // Get user input directly from query parameter without sanitization
22-
// // This is the source of the XSS vulnerability
23-
// const userInput = req.query.input || 'No input provided';
20+
router.get('/', (req, res) => {
21+
// Get user input directly from query parameter without sanitization
22+
// This is the source of the XSS vulnerability
23+
const userInput = req.query.input || 'No input provided';
2424

25-
// const html = processUserInput(userInput, res);
25+
const html = processUserInput(userInput, res);
2626

27-
// res.send(html);
28-
// });
27+
res.send(html);
28+
});
2929

3030
function processUserInput(userInput, res) {
3131
return `

0 commit comments

Comments
 (0)