Skip to content

Commit

Permalink
Add a check for phar RO
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Jul 9, 2020
1 parent 5cbf5a4 commit f607912
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions phpconfigcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ function test_all_ini_entries()
'last_modified' => "The Last-Modified header will be sent for PHP scripts. This is a minor information disclosure.",
'zend.multibyte' => "This is highly unusual. If possible, try to avoid multibyte encodings in source files - like SJIS, BIG5 - and use UTF-8 instead. Most XSS and other injection protections are not aware of multibyte encodings or can easily be confused. In order to use UTF-8, this option can safely be deactivated.",
'max_input_vars' => "This setting may be incorrect. Unless your application actually needs an incredible number of input variables, please set this to a reasonable value, e.g. 1000.",
"phar.readonly" => "The creation and modification of phar files should be disabled in production",

/* Suhosin */
'suhosin.simulation' => "During initial deployment of Suhosin, this flag should be switched on to ensure that the application continues to work under the new configuration. After carefully evaluating Suhosin's log messages, you may consider switching the simulation mode off.",
Expand Down Expand Up @@ -808,6 +809,11 @@ function test_all_ini_entries()
list($result, $reason) = array(TEST_HIGH, "Multibyte encodings are active.");
}
break;
case 'phar.readonly':
if (!is_on($v)) {
list($result, $reason) = array(TEST_LOW, "Phar files aren't readonly.");
}
break;

/* ===== Suhosin ===== */
case 'suhosin.simulation':
Expand Down

0 comments on commit f607912

Please sign in to comment.