Skip to content

Commit

Permalink
Fix CLI tests for include, include_once, etc...
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-timcu committed Dec 18, 2024
1 parent b0eeee1 commit e1946af
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
Empty file added tests/cli/bait_file.txt
Empty file.
6 changes: 4 additions & 2 deletions tests/cli/path_traversal/test_path_traversal_include.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ AIKIDO_BLOCK=1
--FILE--
<?php

$_SERVER['HTTP_USER'] = '../file';
$file = '../../bait_file.txt';

$file = '../file/test.txt';
$_SERVER['HTTP_USER'] = $file;

symlink("./test/cli/bait_file.txt", $file);

include($file);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ AIKIDO_BLOCK=1
--FILE--
<?php

$_SERVER['HTTP_USER'] = '../file';
$file = '../../bait_file.txt';

$file = '../file/test.txt';
$_SERVER['HTTP_USER'] = $file;

symlink("./test/cli/bait_file.txt", $file);

include_once($file);

Expand Down
6 changes: 4 additions & 2 deletions tests/cli/path_traversal/test_path_traversal_require.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ AIKIDO_BLOCK=1
--FILE--
<?php

$_SERVER['HTTP_USER'] = '../file';
$file = '../../bait_file.txt';

$file = '../file/test.txt';
$_SERVER['HTTP_USER'] = $file;

symlink("./test/cli/bait_file.txt", $file);

require($file);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ AIKIDO_BLOCK=1
--FILE--
<?php

$_SERVER['HTTP_USER'] = '../file';
$file = '../../bait_file.txt';

$file = '../file/test.txt';
$_SERVER['HTTP_USER'] = $file;

symlink("./test/cli/bait_file.txt", $file);

require_once($file);

Expand Down

0 comments on commit e1946af

Please sign in to comment.