We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8199622 commit 3956d95Copy full SHA for 3956d95
library/vulnerabilities/sql-injection/detectSQLInjection.sqlite.test.ts
@@ -3,9 +3,16 @@ import { detectSQLInjection } from "./detectSQLInjection";
3
import { SQLDialectSQLite } from "./dialects/SQLDialectSQLite";
4
5
t.test("It flags the VACUUM command as SQL injection", async () => {
6
- isNotSQLInjection("VACUUM;", "VACUUM");
+ isSqlInjection("VACUUM;", "VACUUM;");
7
});
8
9
+t.test(
10
+ "It does not flag the VACUUM command without semicolon as SQL injection",
11
+ async () => {
12
+ isNotSQLInjection("VACUUM;", "VACUUM");
13
+ }
14
+);
15
+
16
t.test("It flags the ATTACH command as SQL injection", async () => {
17
isSqlInjection("ATTACH DATABASE 'test.db' AS test;", "'test.db' AS test");
18
0 commit comments