Skip to content

Commit

Permalink
Merge pull request #116 from AikidoSec/AIK-4112-zen-update
Browse files Browse the repository at this point in the history
AIK-4112: Update Zen internals to v0.1.33
  • Loading branch information
willem-delbare authored Jan 2, 2025
2 parents 4d7e46f + 248014e commit e4c3855
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ jobs:
echo $AIKIDO_VERSION
echo "AIKIDO_VERSION=$AIKIDO_VERSION" >> $GITHUB_ENV
echo "AIKIDO_LIBZEN=libzen_internals_x86_64-unknown-linux-gnu.so" >> $GITHUB_ENV
echo "AIKIDO_LIBZEN_VERSION=0.1.31" >> $GITHUB_ENV
echo "AIKIDO_LIBZEN_VERSION=0.1.33" >> $GITHUB_ENV
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
--TEST--
Test SQLite database operations

--ENV--
AIKIDO_LOG_LEVEL=INFO
AIKIDO_BLOCK=1

--FILE--
<?php
try {
$pdo = new PDO('sqlite::memory:');
$pdo->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', '[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");

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.*

0 comments on commit e4c3855

Please sign in to comment.