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

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Esben Sparre Andreasen
2021-01-22 14:03:21 +01:00
committed by GitHub
parent 718f6eb3fd
commit 3f3962f7a9

View File

@@ -1,6 +1,6 @@
// ...
express().post("/save", async (req, res) => {
if (await fs.promises.exists(rootDir)) {
if (!(await fs.promises.exists(rootDir))) {
console.error(`Server setup is corrupted, ${rootDir} does not exist!`);
res.status(500);
res.end();