From 0aaf381e850e085845ab428b7f2b8958aa420d53 Mon Sep 17 00:00:00 2001 From: Willem delbare Date: Fri, 3 Jan 2025 12:37:34 +0100 Subject: [PATCH] Revert "Merge pull request #119 from AikidoSec/reintroduce-test" This reverts commit 7e0b1e00d42ce560cb1a17dd428e7e3929c45d6f, reversing changes made to b107cdce373d4490344dbc6eca2014c8fb711de7. --- ...l_injection_sqlite_dollar_placeholder.phpt | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 tests/cli/sql_injection/sql_injection_sqlite_dollar_placeholder.phpt diff --git a/tests/cli/sql_injection/sql_injection_sqlite_dollar_placeholder.phpt b/tests/cli/sql_injection/sql_injection_sqlite_dollar_placeholder.phpt deleted file mode 100644 index 22792028..00000000 --- a/tests/cli/sql_injection/sql_injection_sqlite_dollar_placeholder.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -Test SQLite database operations - ---ENV-- -AIKIDO_LOG_LEVEL=INFO -AIKIDO_BLOCK=1 - ---FILE-- -setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - $pdo->exec("CREATE TABLE IF NOT EXISTS users ( - id INTEGER PRIMARY KEY, - name TEXT, - email TEXT)"); - - $pdo->exec("INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com')"); - - // Simulate user input - $unsafeInput = "1' OR $$ IS NULL -- "; - $_SERVER['HTTP_USER'] = $unsafeInput; - - // Vulnerable query - $result = $pdo->query("SELECT * FROM users WHERE id = $unsafeInput"); - - foreach ($result as $row) { - echo "ID: " . $row['id'] . "\n"; - echo "Name: " . $row['name'] . "\n"; - echo "Email: " . $row['email'] . "\n\n"; - } -} catch (PDOException $e) { - echo "Connection failed: " . $e->getMessage(); -} - -// Close the database connection -$pdo = null; - -?> - ---EXPECTREGEX-- -.*Fatal error: Uncaught Exception: Aikido firewall has blocked an SQL injection.*