diff options
Diffstat (limited to 'src')
38 files changed, 100 insertions, 100 deletions
diff --git a/src/tests/disable_function/config/disabled_function_local_var.ini b/src/tests/disable_function/config/disabled_function_local_var.ini index 3d553c0..81b6771 100644 --- a/src/tests/disable_function/config/disabled_function_local_var.ini +++ b/src/tests/disable_function/config/disabled_function_local_var.ini | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | sp.disable_function.function("phpinfo").var("$b").value("1337").drop(); | 1 | sp.disable_function.function("phpinfo").var("$b").value("1337").drop(); |
| 2 | sp.disable_function.function("strlen").var("$a").value("1337").drop(); | 2 | sp.disable_function.function("strtoupper").var("$a").value("1337").drop(); |
| 3 | sp.disable_function.function("strlen").var("$a['123']").value("block").drop(); | 3 | sp.disable_function.function("strtoupper").var("$a['123']").value("block").drop(); |
| 4 | sp.disable_function.function("strlen").var("$a[$c]->prop").value("block").drop(); | 4 | sp.disable_function.function("strtoupper").var("$a[$c]->prop").value("block").drop(); |
| 5 | sp.disable_function.function("strlen").var("$a->zxc").value("not a good value").drop(); | 5 | sp.disable_function.function("strtoupper").var("$a->zxc").value("not a good value").drop(); |
| 6 | sp.disable_function.function("strlen").var("\\asd\\test_object::TEST_VALUE['constant']").value("no good").drop(); | 6 | sp.disable_function.function("strtoupper").var("\\asd\\test_object::TEST_VALUE['constant']").value("no good").drop(); |
| 7 | sp.disable_function.function("strlen").var("\\asd\\test_object::TEST_VALUE").value("qwerty").drop(); | 7 | sp.disable_function.function("strtoupper").var("\\asd\\test_object::TEST_VALUE").value("qwerty").drop(); |
| 8 | sp.disable_function.function("strlen").var("\\qwe\\ASD").value("qwerty").drop(); | 8 | sp.disable_function.function("strtoupper").var("\\qwe\\ASD").value("qwerty").drop(); |
| 9 | sp.disable_function.function("strlen").var("\\qwe\\QWE['123']").value("asdfgh").drop(); | 9 | sp.disable_function.function("strtoupper").var("\\qwe\\QWE['123']").value("asdfgh").drop(); |
| 10 | sp.disable_function.function("strlen").var("$qwe").value("block this").drop(); | 10 | sp.disable_function.function("strtoupper").var("$qwe").value("block this").drop(); |
diff --git a/src/tests/disable_function/config/disabled_function_local_var_2.ini b/src/tests/disable_function/config/disabled_function_local_var_2.ini index 6c0ae66..34dd8d1 100644 --- a/src/tests/disable_function/config/disabled_function_local_var_2.ini +++ b/src/tests/disable_function/config/disabled_function_local_var_2.ini | |||
| @@ -1 +1 @@ | |||
| sp.disable_function.function("strlen").var("$b['_GET][\"obj->nop::qwe'][$b[456][$d->$idk->qwe[\\qwe\\UNE_CONSTANTE]]][$a]->uio").value("valeur de apres").drop(); | sp.disable_function.function("strtoupper").var("$b['_GET][\"obj->nop::qwe'][$b[456][$d->$idk->qwe[\\qwe\\UNE_CONSTANTE]]][$a]->uio").value("valeur de apres").drop(); | ||
diff --git a/src/tests/disable_function/config/disabled_function_local_var_const.ini b/src/tests/disable_function/config/disabled_function_local_var_const.ini index 8450de5..884750d 100644 --- a/src/tests/disable_function/config/disabled_function_local_var_const.ini +++ b/src/tests/disable_function/config/disabled_function_local_var_const.ini | |||
| @@ -1 +1 @@ | |||
| sp.disable_function.function("strlen").var("MY_CONST").value("1337").drop(); | sp.disable_function.function("strtoupper").var("MY_CONST").value("1337").drop(); | ||
diff --git a/src/tests/disable_function/config/disabled_function_local_var_obj.ini b/src/tests/disable_function/config/disabled_function_local_var_obj.ini index df6b617..65c4a11 100644 --- a/src/tests/disable_function/config/disabled_function_local_var_obj.ini +++ b/src/tests/disable_function/config/disabled_function_local_var_obj.ini | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | sp.disable_function.function("strlen").var("$test->$test_array").value("value").drop(); | 1 | sp.disable_function.function("strtoupper").var("$test->$test_array").value("value").drop(); |
| 2 | sp.disable_function.function("strlen").var("$arg->$test_array").value("value").drop(); | 2 | sp.disable_function.function("strtoupper").var("$arg->$test_array").value("value").drop(); |
| 3 | sp.disable_function.function("strlen").var("$test->$arg").value("nop_object").drop(); | 3 | sp.disable_function.function("strtoupper").var("$test->$arg").value("nop_object").drop(); |
diff --git a/src/tests/disable_function/config/disabled_function_super_global_var.ini b/src/tests/disable_function/config/disabled_function_super_global_var.ini index 178a01a..5bb2d04 100644 --- a/src/tests/disable_function/config/disabled_function_super_global_var.ini +++ b/src/tests/disable_function/config/disabled_function_super_global_var.ini | |||
| @@ -1 +1 @@ | |||
| sp.disable_function.function("strlen").var("$_GET[bla]").value("test2").drop(); | sp.disable_function.function("strtoupper").var("$_GET[bla]").value("test2").drop(); | ||
diff --git a/src/tests/disable_function/config/disabled_functions_mb.ini b/src/tests/disable_function/config/disabled_functions_mb.ini index 36eae40..f365063 100644 --- a/src/tests/disable_function/config/disabled_functions_mb.ini +++ b/src/tests/disable_function/config/disabled_functions_mb.ini | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | sp.disable_function.function("strlen").drop(); | 1 | sp.disable_function.function("strtoupper").drop(); |
| 2 | sp.disable_function.function("mb_strlen").drop(); | 2 | sp.disable_function.function("mb_strlen").drop(); |
diff --git a/src/tests/disable_function/config/disabled_functions_pos.ini b/src/tests/disable_function/config/disabled_functions_pos.ini index 7f7c04d..f4c1e05 100644 --- a/src/tests/disable_function/config/disabled_functions_pos.ini +++ b/src/tests/disable_function/config/disabled_functions_pos.ini | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | sp.disable_function.function("system").pos("1337").value("id").drop(); | 1 | sp.disable_function.function("system").pos("1337").value("id").drop(); |
| 2 | sp.disable_function.function("system").pos("0").value("id").drop(); | 2 | sp.disable_function.function("system").pos("0").value("id").drop(); |
| 3 | sp.disable_function.function("system").pos("1").param_type("ARRAY").alias("1").drop(); | 3 | sp.disable_function.function("system").pos("1").param_type("ARRAY").alias("1").drop(); |
| 4 | sp.disable_function.function("strlen").pos("0").value("id").alias("strlen array").drop(); | 4 | sp.disable_function.function("strtoupper").pos("0").value("id").alias("strlen array").drop(); |
diff --git a/src/tests/disable_function/config/disabled_functions_ret_type_long.ini b/src/tests/disable_function/config/disabled_functions_ret_type_long.ini index 03abf8a..c68332b 100644 --- a/src/tests/disable_function/config/disabled_functions_ret_type_long.ini +++ b/src/tests/disable_function/config/disabled_functions_ret_type_long.ini | |||
| @@ -1 +1 @@ | |||
| sp.disable_function.function("strlen").ret_type("long").drop().alias("Return value is a long"); | sp.disable_function.function("strpos").ret_type("long").drop().alias("Return value is a long"); | ||
diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index 99b2b08..58dc2ea 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt | |||
| @@ -8,7 +8,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | $a = 1338; | 9 | $a = 1338; |
| 10 | function test(){ | 10 | function test(){ |
| 11 | echo strlen("id") . "\n"; | 11 | echo strtoupper("id") . "\n"; |
| 12 | } | 12 | } |
| 13 | echo "Value of a: $a\n"; | 13 | echo "Value of a: $a\n"; |
| 14 | test(); | 14 | test(); |
| @@ -19,7 +19,7 @@ test(); | |||
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | Value of a: 1338 | 21 | Value of a: 1338 |
| 22 | 2 | 22 | ID |
| 23 | Value of a: 1337 | 23 | Value of a: 1337 |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var.php on line 4 \ No newline at end of file | 25 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index 4902972..e50a5a4 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt | |||
| @@ -8,10 +8,10 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | $qwe = Array('123' => Array('qwe'), '456' => Array('no block this')); | 9 | $qwe = Array('123' => Array('qwe'), '456' => Array('no block this')); |
| 10 | var_dump($qwe); | 10 | var_dump($qwe); |
| 11 | strlen("qwe"); | 11 | strtoupper("qwe"); |
| 12 | $qwe = Array('123' => Array('qwe'), '456' => Array(Array('block this'))); | 12 | $qwe = Array('123' => Array('qwe'), '456' => Array(Array('block this'))); |
| 13 | var_dump($qwe); | 13 | var_dump($qwe); |
| 14 | strlen("qwe"); | 14 | strtoupper("qwe"); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | array(2) { | 17 | array(2) { |
| @@ -42,4 +42,4 @@ array(2) { | |||
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file | 45 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index 5b21d07..5a186cd 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt | |||
| @@ -8,7 +8,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | $a = 1338; | 9 | $a = 1338; |
| 10 | function test(){ | 10 | function test(){ |
| 11 | echo strlen("id") . "\n"; | 11 | echo strtoupper("id") . "\n"; |
| 12 | } | 12 | } |
| 13 | echo "Value of a: $a\n"; | 13 | echo "Value of a: $a\n"; |
| 14 | test(); | 14 | test(); |
| @@ -27,7 +27,7 @@ test(); | |||
| 27 | ?> | 27 | ?> |
| 28 | --EXPECTF-- | 28 | --EXPECTF-- |
| 29 | Value of a: 1338 | 29 | Value of a: 1338 |
| 30 | 2 | 30 | ID |
| 31 | Value of a: | 31 | Value of a: |
| 32 | array(2) { | 32 | array(2) { |
| 33 | ["qwe"]=> | 33 | ["qwe"]=> |
| @@ -35,7 +35,7 @@ array(2) { | |||
| 35 | [123]=> | 35 | [123]=> |
| 36 | string(3) "nop" | 36 | string(3) "nop" |
| 37 | } | 37 | } |
| 38 | 2 | 38 | ID |
| 39 | Value of a: | 39 | Value of a: |
| 40 | array(2) { | 40 | array(2) { |
| 41 | ["qwe"]=> | 41 | ["qwe"]=> |
| @@ -44,4 +44,4 @@ array(2) { | |||
| 44 | string(5) "block" | 44 | string(5) "block" |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_2.php on line 4 \ No newline at end of file | 47 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index 597be1d..6399a1e 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt | |||
| @@ -7,7 +7,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | function test(){ | 9 | function test(){ |
| 10 | echo strlen("id") . "\n"; | 10 | echo strtoupper("id") . "\n"; |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | $a = Array(); | 13 | $a = Array(); |
| @@ -31,7 +31,7 @@ array(2) { | |||
| 31 | [123]=> | 31 | [123]=> |
| 32 | string(3) "nop" | 32 | string(3) "nop" |
| 33 | } | 33 | } |
| 34 | 2 | 34 | ID |
| 35 | Value of a: | 35 | Value of a: |
| 36 | array(2) { | 36 | array(2) { |
| 37 | ["qwe"]=> | 37 | ["qwe"]=> |
| @@ -43,4 +43,4 @@ array(2) { | |||
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_3.php on line 3 \ No newline at end of file | 46 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index b441576..f0b1291 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt | |||
| @@ -40,7 +40,7 @@ class test_object { | |||
| 40 | $d = new test_object($c); | 40 | $d = new test_object($c); |
| 41 | $a = 1338; | 41 | $a = 1338; |
| 42 | function test(){ | 42 | function test(){ |
| 43 | strlen("qwe"); | 43 | strtoupper("qwe"); |
| 44 | } | 44 | } |
| 45 | echo "Valeur: " . $b['_GET]["obj->nop::qwe']["qwe"][$a]->uio . "\n"; | 45 | echo "Valeur: " . $b['_GET]["obj->nop::qwe']["qwe"][$a]->uio . "\n"; |
| 46 | test(); | 46 | test(); |
| @@ -54,4 +54,4 @@ test(); | |||
| 54 | Valeur: valeur de a | 54 | Valeur: valeur de a |
| 55 | Valeur: valeur de apres | 55 | Valeur: valeur de apres |
| 56 | 56 | ||
| 57 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file | 57 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index 602e96e..431bbf9 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt | |||
| @@ -7,7 +7,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | function test(){ | 9 | function test(){ |
| 10 | echo strlen("id") . "\n"; | 10 | echo strtoupper("id") . "\n"; |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | $a = Array(); | 13 | $a = Array(); |
| @@ -24,11 +24,11 @@ test(); | |||
| 24 | Value of a: | 24 | Value of a: |
| 25 | array(0) { | 25 | array(0) { |
| 26 | } | 26 | } |
| 27 | 2 | 27 | ID |
| 28 | Value of a: | 28 | Value of a: |
| 29 | object(stdClass)#1 (1) { | 29 | object(stdClass)#1 (1) { |
| 30 | ["zxc"]=> | 30 | ["zxc"]=> |
| 31 | string(16) "not a good value" | 31 | string(16) "not a good value" |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_5.php on line 3 \ No newline at end of file | 34 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index 1866353..0bb9f6d 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt | |||
| @@ -8,7 +8,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | namespace asd { | 9 | namespace asd { |
| 10 | function test(){ | 10 | function test(){ |
| 11 | strlen("qwe"); | 11 | strtoupper("qwe"); |
| 12 | } | 12 | } |
| 13 | echo "Valeur: " . \asd\test_object::TEST_VALUE['constant'] . "\n"; | 13 | echo "Valeur: " . \asd\test_object::TEST_VALUE['constant'] . "\n"; |
| 14 | test(); | 14 | test(); |
| @@ -29,4 +29,4 @@ class test_object { | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: no good | 30 | Valeur: no good |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file | 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index e615a80..d5c74ba 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt | |||
| @@ -8,7 +8,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | namespace asd { | 9 | namespace asd { |
| 10 | function test(){ | 10 | function test(){ |
| 11 | strlen("qwe"); | 11 | strtoupper("qwe"); |
| 12 | } | 12 | } |
| 13 | echo "Valeur: " . \asd\test_object::TEST_VALUE . "\n"; | 13 | echo "Valeur: " . \asd\test_object::TEST_VALUE . "\n"; |
| 14 | test(); | 14 | test(); |
| @@ -29,4 +29,4 @@ class test_object { | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: qwerty | 30 | Valeur: qwerty |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file | 32 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index 1f1a0dc..436cca2 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt | |||
| @@ -12,10 +12,10 @@ namespace qwe { | |||
| 12 | namespace asd { | 12 | namespace asd { |
| 13 | const asd = 'qwe'; | 13 | const asd = 'qwe'; |
| 14 | echo "Valeur: " . \qwe\ASD . "\n"; | 14 | echo "Valeur: " . \qwe\ASD . "\n"; |
| 15 | strlen("qwe"); | 15 | strtoupper("qwe"); |
| 16 | } | 16 | } |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: qwerty | 19 | Valeur: qwerty |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index 458d878..5844458 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt | |||
| @@ -12,10 +12,10 @@ namespace qwe { | |||
| 12 | namespace asd { | 12 | namespace asd { |
| 13 | const asd = 'qwe'; | 13 | const asd = 'qwe'; |
| 14 | echo "Valeur: " . \qwe\QWE[123]. "\n"; | 14 | echo "Valeur: " . \qwe\QWE[123]. "\n"; |
| 15 | strlen("qwe"); | 15 | strtoupper("qwe"); |
| 16 | } | 16 | } |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: asdfgh | 19 | Valeur: asdfgh |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index 8d9d58a..2013f6d 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt | |||
| @@ -8,7 +8,7 @@ sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | $a = 1337; | 9 | $a = 1337; |
| 10 | define("MY_CONST", $a); | 10 | define("MY_CONST", $a); |
| 11 | strlen("test"); | 11 | strtoupper("test"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_local_var_crash.phpt b/src/tests/disable_function/disabled_function_local_var_crash.phpt index 8dec946..3381b6c 100644 --- a/src/tests/disable_function/disabled_function_local_var_crash.phpt +++ b/src/tests/disable_function/disabled_function_local_var_crash.phpt | |||
| @@ -7,12 +7,12 @@ sp.configuration_file={PWD}/config/disabled_function_local_var.ini | |||
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | function test(){ | 9 | function test(){ |
| 10 | echo strlen("id") . "\n"; | 10 | echo strtoupper("id") . "\n"; |
| 11 | } | 11 | } |
| 12 | ob_start(test()); | 12 | ob_start(test()); |
| 13 | echo "test\n"; | 13 | echo "test\n"; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | 2 | 16 | ID |
| 17 | test | 17 | test |
| 18 | 18 | ||
diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index 29d57cc..89e423a 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt | |||
| @@ -16,11 +16,11 @@ class test_class { | |||
| 16 | $test_array = ['qwe']; | 16 | $test_array = ['qwe']; |
| 17 | $arg = 'qwe'; | 17 | $arg = 'qwe'; |
| 18 | $test = new test_class('qwe', 'qwe'); | 18 | $test = new test_class('qwe', 'qwe'); |
| 19 | echo strlen($test->$arg) . "\n"; | 19 | echo strtoupper($test->$arg) . "\n"; |
| 20 | $test = new test_class('qwe', 'nop_object'); | 20 | $test = new test_class('qwe', 'nop_object'); |
| 21 | echo strlen($test->$arg) . "\n"; | 21 | echo strtoupper($test->$arg) . "\n"; |
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | 3 | 24 | QWE |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_local_var_obj.php on line 14 \ No newline at end of file | 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 |
diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index d97194a..196d9e2 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt | |||
| @@ -9,13 +9,13 @@ bla=test | |||
| 9 | --FILE-- | 9 | --FILE-- |
| 10 | <?php | 10 | <?php |
| 11 | function test(){ | 11 | function test(){ |
| 12 | echo strlen($_GET['bla']) . "\n"; | 12 | echo strtoupper($_GET['bla']) . "\n"; |
| 13 | } | 13 | } |
| 14 | test(); | 14 | test(); |
| 15 | $_GET['bla'] = 'test2'; | 15 | $_GET['bla'] = 'test2'; |
| 16 | test(); | 16 | test(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | 4 | 19 | TEST |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_function_super_global_var.php on line 3 | 21 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_mb.phpt b/src/tests/disable_function/disabled_functions_mb.phpt index a2fd99e..923de8e 100644 --- a/src/tests/disable_function/disabled_functions_mb.phpt +++ b/src/tests/disable_function/disabled_functions_mb.phpt | |||
| @@ -6,7 +6,7 @@ Disable functions | |||
| 6 | sp.configuration_file={PWD}/config/disabled_functions_mb.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_mb.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | echo strlen("id"); | 9 | echo strtoupper("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index 87e18c0..7134fdd 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt | |||
| @@ -6,8 +6,8 @@ Disable functions - match on argument's position, not the first time | |||
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | strlen("od"); | 9 | strtoupper("od"); |
| 10 | strlen("id"); | 10 | strtoupper("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index 79f1fc7..5f68a00 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt | |||
| @@ -6,14 +6,14 @@ Disable functions | |||
| 6 | sp.configuration_file={PWD}/config/disabled_functions_regexp.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_regexp.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | echo strlen("id") . "\n"; | 9 | echo strtoupper("id") . "\n"; |
| 10 | echo strcmp("1", "2") . "\n"; | 10 | echo strcmp("1", "2") . "\n"; |
| 11 | print("After") . "\n"; | 11 | print("After") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strlen' in %a/disabled_functions_regexp_multiple.php on line 2 | 14 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 |
| 15 | 2 | 15 | ID |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 | 17 | Warning: [snuffleupagus][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 |
| 18 | -1 | 18 | -1 |
| 19 | After \ No newline at end of file | 19 | After |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_long.phpt b/src/tests/disable_function/disabled_functions_ret_type_long.phpt index c389533..cc78299 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_long.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_long.phpt | |||
| @@ -6,7 +6,7 @@ Disable functions check on `ret` by type matching (long). | |||
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | echo strlen("pouet") . "\n"; | 9 | echo strpos("pouet", "o") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strlen', because the function returned '5', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 |
diff --git a/src/tests/dump_request/config/dump_eval_blacklist.ini b/src/tests/dump_request/config/dump_eval_blacklist.ini index 503143a..52e0202 100644 --- a/src/tests/dump_request/config/dump_eval_blacklist.ini +++ b/src/tests/dump_request/config/dump_eval_blacklist.ini | |||
| @@ -1 +1 @@ | |||
| sp.eval_blacklist.list("strlen").dump("/tmp/dump_result/").simulation(); | sp.eval_blacklist.list("strtoupper").dump("/tmp/dump_result/").simulation(); | ||
diff --git a/src/tests/dump_request/dump_eval_blacklist.phpt b/src/tests/dump_request/dump_eval_blacklist.phpt index a28f34b..459a584 100644 --- a/src/tests/dump_request/dump_eval_blacklist.phpt +++ b/src/tests/dump_request/dump_eval_blacklist.phpt | |||
| @@ -19,9 +19,9 @@ foreach (glob("/tmp/dump_result/sp_dump.*") as $dump) { | |||
| 19 | @unlink($dump); | 19 | @unlink($dump); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | $a = strlen("1337 1337 1337"); | 22 | $a = strtoupper("1337 1337 1337"); |
| 23 | echo "Outside of eval: $a\n"; | 23 | echo "Outside of eval: $a\n"; |
| 24 | eval('$a = strlen("1234");'); | 24 | eval('$a = strtoupper("1234");'); |
| 25 | echo "After eval: $a\n"; | 25 | echo "After eval: $a\n"; |
| 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 27 | $res = file($filename); | 27 | $res = file($filename); |
| @@ -34,7 +34,7 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 34 | } | 34 | } |
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | Outside of eval: 14 | 37 | Outside of eval: 1337 1337 1337 |
| 38 | 38 | ||
| 39 | Warning: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 | 39 | Warning: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 |
| 40 | After eval: 4 | 40 | After eval: 1234 |
diff --git a/src/tests/eval_blacklist/config/eval_backlist.ini b/src/tests/eval_blacklist/config/eval_backlist.ini index b181598..53c2801 100644 --- a/src/tests/eval_blacklist/config/eval_backlist.ini +++ b/src/tests/eval_blacklist/config/eval_backlist.ini | |||
| @@ -1 +1 @@ | |||
| sp.eval_blacklist.list("strlen"); | sp.eval_blacklist.list("strtoupper"); | ||
diff --git a/src/tests/eval_blacklist/config/eval_backlist_list.ini b/src/tests/eval_blacklist/config/eval_backlist_list.ini index b395d03..ffa281e 100644 --- a/src/tests/eval_blacklist/config/eval_backlist_list.ini +++ b/src/tests/eval_blacklist/config/eval_backlist_list.ini | |||
| @@ -1 +1 @@ | |||
| sp.eval_blacklist.list("strcmp,strlen"); | sp.eval_blacklist.list("strcmp,strtoupper,strlen"); | ||
diff --git a/src/tests/eval_blacklist/config/eval_backlist_simulation.ini b/src/tests/eval_blacklist/config/eval_backlist_simulation.ini index 2d8dc73..bb8b5dd 100644 --- a/src/tests/eval_blacklist/config/eval_backlist_simulation.ini +++ b/src/tests/eval_blacklist/config/eval_backlist_simulation.ini | |||
| @@ -1 +1 @@ | |||
| sp.eval_blacklist.list("strlen").simulation(); | sp.eval_blacklist.list("strtoupper").simulation(); | ||
diff --git a/src/tests/eval_blacklist/eval_backlist.phpt b/src/tests/eval_blacklist/eval_backlist.phpt index f24af96..1dbe887 100644 --- a/src/tests/eval_blacklist/eval_backlist.phpt +++ b/src/tests/eval_blacklist/eval_backlist.phpt | |||
| @@ -6,12 +6,12 @@ Eval blacklist | |||
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | $a = strlen("1337 1337 1337"); | 9 | $a = strtoupper("1337 1337 1337"); |
| 10 | echo "Outside of eval: $a\n"; | 10 | echo "Outside of eval: $a\n"; |
| 11 | eval('$a = strlen("1234");'); | 11 | eval('$a = strtoupper("1234");'); |
| 12 | echo "After eval: $a\n"; | 12 | echo "After eval: $a\n"; |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 14 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 |
diff --git a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt index 47e8d71..ac48515 100644 --- a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt +++ b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt | |||
| @@ -7,8 +7,8 @@ sp.configuration_file={PWD}/config/eval_backlist.ini | |||
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | eval(' | 9 | eval(' |
| 10 | call_user_func("strlen", 2); | 10 | call_user_func("strtoupper", 2); |
| 11 | ') | 11 | ') |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d | 14 | Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d |
diff --git a/src/tests/eval_blacklist/eval_backlist_chained.phpt b/src/tests/eval_blacklist/eval_backlist_chained.phpt index 2360e06..dc23857 100644 --- a/src/tests/eval_blacklist/eval_backlist_chained.phpt +++ b/src/tests/eval_blacklist/eval_backlist_chained.phpt | |||
| @@ -8,9 +8,9 @@ sp.configuration_file={PWD}/config/eval_backlist.ini | |||
| 8 | <?php | 8 | <?php |
| 9 | eval(' | 9 | eval(' |
| 10 | cos(1); | 10 | cos(1); |
| 11 | strlen(2); | 11 | strtoupper(2); |
| 12 | sin(3); | 12 | sin(3); |
| 13 | ') | 13 | ') |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d | 16 | Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d |
diff --git a/src/tests/eval_blacklist/eval_backlist_list.phpt b/src/tests/eval_blacklist/eval_backlist_list.phpt index 5bf0ea8..d5bbd00 100644 --- a/src/tests/eval_blacklist/eval_backlist_list.phpt +++ b/src/tests/eval_blacklist/eval_backlist_list.phpt | |||
| @@ -6,12 +6,12 @@ Eval blacklist - with a list of functions | |||
| 6 | sp.configuration_file={PWD}/config/eval_backlist_list.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist_list.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | $a = strlen("1337 1337 1337"); | 9 | $a = strtoupper("1337 1337 1337"); |
| 10 | echo "Outside of eval: $a\n"; | 10 | echo "Outside of eval: $a\n"; |
| 11 | eval('$a = strlen("1234");'); | 11 | eval('$a = strtoupper("1234");'); |
| 12 | echo "After eval: $a\n"; | 12 | echo "After eval: $a\n"; |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 14 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 |
diff --git a/src/tests/eval_blacklist/eval_backlist_simulation.phpt b/src/tests/eval_blacklist/eval_backlist_simulation.phpt index 3089c2d..be4cd3a 100644 --- a/src/tests/eval_blacklist/eval_backlist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_backlist_simulation.phpt | |||
| @@ -6,13 +6,13 @@ Eval blacklist simulation | |||
| 6 | sp.configuration_file={PWD}/config/eval_backlist_simulation.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | $a = strlen("1337 1337 1337"); | 9 | $a = strtoupper("1337 1337 1337"); |
| 10 | echo "Outside of eval: $a\n"; | 10 | echo "Outside of eval: $a\n"; |
| 11 | eval('$a = strlen("1234");'); | 11 | eval('$a = strtoupper("1234");'); |
| 12 | echo "After eval: $a\n"; | 12 | echo "After eval: $a\n"; |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 14 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 | 17 | Warning: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 |
| 18 | After eval: 4 \ No newline at end of file | 18 | After eval: 1234 |
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist.phpt b/src/tests/eval_blacklist/nested_eval_blacklist.phpt index 9671a65..244007e 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist.phpt | |||
| @@ -6,7 +6,7 @@ Eval blacklist - nested eval | |||
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | $a = strlen("1337 1337 1337"); | 9 | $a = strtoupper("1337 1337 1337"); |
| 10 | echo "Outside of eval: $a\n"; | 10 | echo "Outside of eval: $a\n"; |
| 11 | eval( | 11 | eval( |
| 12 | "echo 'Inception lvl 1...\n'; | 12 | "echo 'Inception lvl 1...\n'; |
| @@ -14,16 +14,16 @@ eval( | |||
| 14 | 'echo \"Inception lvl 2...\n\"; | 14 | 'echo \"Inception lvl 2...\n\"; |
| 15 | eval( | 15 | eval( |
| 16 | \"echo \'Inception lvl 3...\n\'; | 16 | \"echo \'Inception lvl 3...\n\'; |
| 17 | strlen(\'Limbo!\'); | 17 | strtoupper(\'Limbo!\'); |
| 18 | \"); | 18 | \"); |
| 19 | '); | 19 | '); |
| 20 | "); | 20 | "); |
| 21 | echo "After eval: $a\n"; | 21 | echo "After eval: $a\n"; |
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | Outside of eval: 14 | 24 | Outside of eval: 1337 1337 1337 |
| 25 | Inception lvl 1... | 25 | Inception lvl 1... |
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | 28 | ||
| 29 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 \ No newline at end of file | 29 | Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 |
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt index aee41db..9f7a4d0 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt | |||
| @@ -6,7 +6,7 @@ Eval blacklist - nested eval, with a twist | |||
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| 8 | <?php | 8 | <?php |
| 9 | $a = strlen("1337 1337 1337"); | 9 | $a = strtoupper("1337 1337 1337"); |
| 10 | echo "Outside of eval: $a\n"; | 10 | echo "Outside of eval: $a\n"; |
| 11 | eval( | 11 | eval( |
| 12 | "echo 'Inception lvl 1...\n'; | 12 | "echo 'Inception lvl 1...\n'; |
| @@ -15,15 +15,15 @@ eval( | |||
| 15 | eval( | 15 | eval( |
| 16 | \"echo \'Inception lvl 3...\n\'; | 16 | \"echo \'Inception lvl 3...\n\'; |
| 17 | \"); | 17 | \"); |
| 18 | strlen(\'Limbo!\'); | 18 | strtoupper(\'Limbo!\'); |
| 19 | '); | 19 | '); |
| 20 | "); | 20 | "); |
| 21 | echo "After eval: $a\n"; | 21 | echo "After eval: $a\n"; |
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | Outside of eval: 14 | 24 | Outside of eval: 1337 1337 1337 |
| 25 | Inception lvl 1... | 25 | Inception lvl 1... |
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | 28 | ||
| 29 | Fatal error: [snuffleupagus][eval] A call to strlen was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 \ No newline at end of file | 29 | Fatal error: [snuffleupagus][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 |
