Skip to content

Commit

Permalink
codeql fix attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
FancMa01 committed Jan 25, 2024
1 parent f8419f2 commit 581da19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/routes/orbit/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ router.get(
const { application_id, keyword } = req.params;
if (!application_id) throw Error("Invalid app ID");

if (!typeof keyword === "string") throw Error("Invalid keyword");

if (!typeof keyword === "string") {
req.status(400).send("Invalid keyword");
return;
}
const query = `select Name from DimBuildInstance where Name like '%${keyword}%' and Name not like 'Scrub%' and EnvironmentName = 'Insurance' order by Name asc`;

const result = await runSQLQuery(query, dbConfig);
Expand Down

0 comments on commit 581da19

Please sign in to comment.