Skip to content

Commit 904976c

Browse files
committed
update tests after removing control-flow checks from error-callbacks
1 parent 1efe2ba commit 904976c

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

javascript/ql/test/query-tests/Security/CWE-079/ExceptionXss.expected

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ nodes
8585
| exception-xss.js:174:53:174:53 | e |
8686
| exception-xss.js:175:22:175:22 | e |
8787
| exception-xss.js:175:22:175:22 | e |
88+
| exception-xss.js:180:11:180:23 | req.params.id |
89+
| exception-xss.js:180:11:180:23 | req.params.id |
90+
| exception-xss.js:180:27:180:31 | error |
91+
| exception-xss.js:182:19:182:23 | error |
92+
| exception-xss.js:182:19:182:23 | error |
8893
| tst.js:304:9:304:16 | location |
8994
| tst.js:304:9:304:16 | location |
9095
| tst.js:305:10:305:10 | e |
@@ -177,6 +182,10 @@ edges
177182
| exception-xss.js:174:31:174:33 | foo | exception-xss.js:174:25:174:43 | exceptional return of inner(foo, resolve) |
178183
| exception-xss.js:174:53:174:53 | e | exception-xss.js:175:22:175:22 | e |
179184
| exception-xss.js:174:53:174:53 | e | exception-xss.js:175:22:175:22 | e |
185+
| exception-xss.js:180:11:180:23 | req.params.id | exception-xss.js:180:27:180:31 | error |
186+
| exception-xss.js:180:11:180:23 | req.params.id | exception-xss.js:180:27:180:31 | error |
187+
| exception-xss.js:180:27:180:31 | error | exception-xss.js:182:19:182:23 | error |
188+
| exception-xss.js:180:27:180:31 | error | exception-xss.js:182:19:182:23 | error |
180189
| tst.js:304:9:304:16 | location | tst.js:305:10:305:10 | e |
181190
| tst.js:304:9:304:16 | location | tst.js:305:10:305:10 | e |
182191
| tst.js:305:10:305:10 | e | tst.js:306:20:306:20 | e |
@@ -202,5 +211,6 @@ edges
202211
| exception-xss.js:155:19:155:19 | e | exception-xss.js:146:15:146:31 | document.location | exception-xss.js:155:19:155:19 | e | Cross-site scripting vulnerability due to $@. | exception-xss.js:146:15:146:31 | document.location | user-provided value |
203212
| exception-xss.js:161:19:161:19 | e | exception-xss.js:146:15:146:31 | document.location | exception-xss.js:161:19:161:19 | e | Cross-site scripting vulnerability due to $@. | exception-xss.js:146:15:146:31 | document.location | user-provided value |
204213
| exception-xss.js:175:22:175:22 | e | exception-xss.js:146:15:146:31 | document.location | exception-xss.js:175:22:175:22 | e | Cross-site scripting vulnerability due to $@. | exception-xss.js:146:15:146:31 | document.location | user-provided value |
214+
| exception-xss.js:182:19:182:23 | error | exception-xss.js:180:11:180:23 | req.params.id | exception-xss.js:182:19:182:23 | error | Cross-site scripting vulnerability due to $@. | exception-xss.js:180:11:180:23 | req.params.id | user-provided value |
205215
| tst.js:306:20:306:20 | e | tst.js:304:9:304:16 | location | tst.js:306:20:306:20 | e | Cross-site scripting vulnerability due to $@. | tst.js:304:9:304:16 | location | user-provided value |
206216
| tst.js:314:20:314:20 | e | tst.js:311:10:311:17 | location | tst.js:314:20:314:20 | e | Cross-site scripting vulnerability due to $@. | tst.js:311:10:311:17 | location | user-provided value |

javascript/ql/test/query-tests/Security/CWE-079/exception-xss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,6 @@ app.get('/user/:id', function(req, res) {
181181
if (error) {
182182
$('myId').html(error); // OK (falls through to the next statement)
183183
}
184-
$('myId').html(res); // OK (for now?)
184+
$('myId').html(res); // NOT OK!
185185
});
186186
});

0 commit comments

Comments
 (0)