Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a check for the new JIT #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.",
'opcache.jit' => "The JIT is enabled, introducing a RWX memory segment in PHP processes, which might facilitate memory-corruption based attacks",

/* 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 'opcache.jit':
if (intval($v) & 1 != 0 ) {
list($result, $reason) = array(TEST_LOW, "JIT enabled.");
}
break;

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