File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
3030function processUserInput ( userInput , res ) {
3131 return `
You can’t perform that action at this time.
0 commit comments