mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Ignore calls and csrf/captcha access
This commit is contained in:
@@ -17,4 +17,13 @@ app.post('/doSomethingElse', (req, res) => { // OK - doesn't actually use cookie
|
||||
res.end('Ok');
|
||||
});
|
||||
|
||||
app.post('/doWithCaptcha', (req, res) => { // OK - attacker can't guess the captcha value either
|
||||
if (req.session['captcha'] !== req.query['captcha']) {
|
||||
res.end("You guessed wrong, that 'u' was actually a 'U'. Try again.");
|
||||
return;
|
||||
}
|
||||
somethingElse(req.query['data']);
|
||||
res.end('Ok');
|
||||
});
|
||||
|
||||
app.listen();
|
||||
|
||||
Reference in New Issue
Block a user