-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c50898
commit 6885ac8
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,12 @@ Test SQLite database operations | |
AIKIDO_LOG_LEVEL=INFO | ||
AIKIDO_BLOCK=1 | ||
|
||
--POST_RAW-- | ||
Content-Type: application/json | ||
{ | ||
"test": "1' OR $$ IS NULL -- " | ||
} | ||
|
||
--FILE-- | ||
<?php | ||
try { | ||
|
@@ -17,12 +23,8 @@ try { | |
|
||
$pdo->exec("INSERT INTO users (name, email) VALUES ('John Doe', '[email protected]')"); | ||
|
||
// Simulate user input | ||
$unsafeInput = "1' OR $$ IS NULL -- "; | ||
$_SERVER['HTTP_USER'] = $unsafeInput; | ||
|
||
// Vulnerable query | ||
$result = $pdo->query("SELECT * FROM users WHERE id = '$unsafeInput'"); | ||
$result = $pdo->query("SELECT * FROM users WHERE id = '1' OR $$ IS NULL -- '"); | ||
|
||
foreach ($result as $row) { | ||
echo "ID: " . $row['id'] . "\n"; | ||
|