Skip to content

Commit 3a73513

Browse files
committed
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.
1 parent 4a5671b commit 3a73513

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascript/ql/test/query-tests/Security/CWE-807/example_bypass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ var app = express();
33
// ...
44
app.get('/full-profile/:userId', function(req, res) {
55

6-
if (req.cookies.loggedInUserId !== req.params.userId) { // $ Alert
7-
requireLogin(); // $ Alert - login decision made based on user controlled data
6+
if (req.cookies.loggedInUserId !== req.params.userId) { // $ Alert[js/different-kinds-comparison-bypass]
7+
requireLogin(); // $ MISSING: Alert - login decision made based on user controlled data
88
} else {
99
// ... show private information
1010
}

0 commit comments

Comments
 (0)