-
Notifications
You must be signed in to change notification settings - Fork 159
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
fb04a9a
commit e59193b
Showing
6 changed files
with
123 additions
and
4 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
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
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
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
31 changes: 31 additions & 0 deletions
31
appsec/tests/integration/src/test/www/base/public/filesystem.php
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
function one() { | ||
$function = $_GET['function']; | ||
$path = $_GET['path']; | ||
|
||
switch ($function) { | ||
case 'file_put_contents': | ||
file_put_contents($path, 'some content'); | ||
break; | ||
case 'fopen': | ||
fopen($path, 'r'); | ||
break; | ||
default: | ||
$function($path); | ||
break; | ||
} | ||
} | ||
|
||
function two() { | ||
one(); | ||
} | ||
|
||
function three() { | ||
two(); | ||
} | ||
|
||
three(); | ||
|
||
|
||
echo "OK"; |
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 |
---|---|---|
|
@@ -41,7 +41,6 @@ public function init(): int | |
null | ||
); | ||
|
||
|
||
\DDTrace\install_hook( | ||
'lstat', | ||
self::preHook('lstat'), | ||
|