Skip to content

Commit

Permalink
Function changed to check for register_globals. MDL-12914 ; merged fr…
Browse files Browse the repository at this point in the history
…om 19_STABLE
  • Loading branch information
stronk7 committed Jan 12, 2008
1 parent f58fcc8 commit 6cf0583
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/customcheckslib.php
Expand Up @@ -35,15 +35,23 @@
/// - false: if failed

/**
* This function will look for some risky PHP settings combinations
* in order to inform about.
* This function will look for the risky PHP setting register_globals
* in order to inform about. MDL-12914
*
* @param $result the environment_results object to be modified
* @return mixed null if the test is irrelevant or environment_results object with
* status set to true (test passed) or false (test failed)
*/
function php_check_register_globals_and_fopen($result) {
return null;
function php_check_register_globals($result) {

/// Check for register_globals. If enabled, security warning
if (ini_get_bool('register_globals')) {
$result->status = false;
} else {
$result = null;
}

return $result;
}

?>

0 comments on commit 6cf0583

Please sign in to comment.