Skip to content

Commit b5b0a64

Browse files
authored
Merge pull request github#11751 from jacola/main
Fix javascript syntax
2 parents 6be223a + b99c500 commit b5b0a64

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

javascript/ql/src/Security/CWE-754/examples/UnvalidatedDynamicMethodCallGood.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ var express = require('express');
22
var app = express();
33

44
var actions = new Map();
5-
actions.put("play", function play(data) {
5+
actions.set("play", function play(data) {
66
// ...
77
});
8-
actions.put("pause", function pause(data) {
8+
actions.set("pause", function pause(data) {
99
// ...
1010
});
1111

javascript/ql/test/query-tests/Security/CWE-754/UnvalidatedDynamicMethodCall3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ var express = require('express');
22
var app = express();
33

44
var actions = new Map();
5-
actions.put("play", function play(data) {
5+
actions.set("play", function play(data) {
66
// ...
77
});
8-
actions.put("pause", function pause(data) {
8+
actions.set("pause", function pause(data) {
99
// ...
1010
});
1111

@@ -14,4 +14,4 @@ app.get('/perform/:action/:payload', function(req, res) {
1414
let action = actions.get(req.params.action);
1515
res.end(action(req.params.payload)); // NOT OK, but not flagged [INCONSISTENCY]
1616
}
17-
});
17+
});

0 commit comments

Comments
 (0)