mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Update javascript/ql/test/query-tests/Security/CWE-730/server-crash.js
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
committed by
GitHub
parent
12b985be87
commit
1bc7d68a50
@@ -70,4 +70,13 @@ app.get("/async-throw", (req, res) => {
|
||||
fs.readFile("/WHATEVER", (err, x) => {
|
||||
res.setHeader("reflected", unknown); // OK
|
||||
});
|
||||
|
||||
try {
|
||||
indirection7();
|
||||
} catch (e) {}
|
||||
});
|
||||
function indirection7() {
|
||||
fs.readFile("/foo", (err, x) => {
|
||||
throw err; // NOT OK
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user