mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
JS: Update alerts in example_bypass.js
We happen to flag the condition with different-kinds-comparison-bypass. The ConditionalBypass query was originally intended to flag this I think, but doesn't anymore.
This commit is contained in:
@@ -3,8 +3,8 @@ var app = express();
|
||||
// ...
|
||||
app.get('/full-profile/:userId', function(req, res) {
|
||||
|
||||
if (req.cookies.loggedInUserId !== req.params.userId) { // $ Alert
|
||||
requireLogin(); // $ Alert - login decision made based on user controlled data
|
||||
if (req.cookies.loggedInUserId !== req.params.userId) { // $ Alert[js/different-kinds-comparison-bypass]
|
||||
requireLogin(); // $ MISSING: Alert - login decision made based on user controlled data
|
||||
} else {
|
||||
// ... show private information
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user