Changeset 110
- Timestamp:
- 2007-12-21 20:50:51 (1 year ago)
- Files:
-
- trunk/includes/input.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/includes/input.php
r104 r110 26 26 * because the damage is already done once that takes effect, so... */ 27 27 if (ini_get('register_globals') !== 0 && strtolower(ini_get('register_globals')) !== 'off') { 28 // don't touch the following: 29 $not = Array(); 30 $not[] = 'SETTINGS'; 31 $not[] = 'VERSION'; 32 $not[] = 'BOTS'; 33 $not[] = 'MEMBERSTAGES'; 34 $not[] = 'CIPHER'; 35 $not[] = 'HASH'; 36 $not[] = 'LANG'; 37 $not[] = 'RULES'; 38 $not[] = 'STATUS'; 28 39 // 'de-register' all local names of global variables 29 40 foreach ($_SERVER as $key=>$val) { 30 unset($$key); 41 if (in_array($key, $not) === FALSE) { 42 unset($$key); 43 } 31 44 } 32 45 foreach ($_GET as $key=>$val) { 33 unset($$key); 46 if (in_array($key, $not) === FALSE) { 47 unset($$key); 48 } 34 49 } 35 50 foreach ($_POST as $key=>$val) { 36 unset($$key); 51 if (in_array($key, $not) === FALSE) { 52 unset($$key); 53 } 37 54 } 38 55 foreach ($_COOKIE as $key=>$val) { 39 unset($$key); 56 if (in_array($key, $not) === FALSE) { 57 unset($$key); 58 } 40 59 } 41 60 foreach ($_FILES as $key=>$val) { 42 unset($$key); 61 if (in_array($key, $not) === FALSE) { 62 unset($$key); 63 } 43 64 } 44 65 foreach ($_ENV as $key=>$val) { 45 unset($$key); 66 if (in_array($key, $not) === FALSE) { 67 unset($$key); 68 } 46 69 } 47 70 foreach ($_REQUEST as $key=>$val) { 48 unset($$key); 71 if (in_array($key, $not) === FALSE) { 72 unset($$key); 73 } 49 74 } 50 75 if (isset($_SESSION) && is_array($_SESSION)) { 51 76 foreach ($_SESSION as $key=>$val) { 52 unset($$key); 77 if (in_array($key, $not) === FALSE) { 78 unset($$key); 79 } 53 80 } 54 81 }
