Skip to content

Commit 3f3962f

Browse files
esbenaerik-krogh
andauthored
Update javascript/ql/src/Security/CWE-730/examples/server-crash.GOOD-B.js
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
1 parent 718f6eb commit 3f3962f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/src/Security/CWE-730/examples/server-crash.GOOD-B.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ...
22
express().post("/save", async (req, res) => {
3-
if (await fs.promises.exists(rootDir)) {
3+
if (!(await fs.promises.exists(rootDir))) {
44
console.error(`Server setup is corrupted, ${rootDir} does not exist!`);
55
res.status(500);
66
res.end();

0 commit comments

Comments
 (0)