]> git.mjollnir.org Git - moodle.git/commitdiff
Function changed to check for register_globals. MDL-12914 ; merged from 19_STABLE
authorstronk7 <stronk7>
Sat, 12 Jan 2008 18:54:30 +0000 (18:54 +0000)
committerstronk7 <stronk7>
Sat, 12 Jan 2008 18:54:30 +0000 (18:54 +0000)
lib/customcheckslib.php

index 38c36f59f398bd6a0900037940f060cf164f7222..ead8e83ce84d108bd7bfee473c4f1801c049b681 100644 (file)
 ///     - 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;
 }
 
 ?>