| @@ 620-630 (lines=11) @@ | ||
| 617 | protected function _sanitize_globals() |
|
| 618 | { |
|
| 619 | // Is $_GET data allowed? If not we'll set the $_GET to an empty array |
|
| 620 | if ($this->_allow_get_array === FALSE) |
|
| 621 | { |
|
| 622 | $_GET = array(); |
|
| 623 | } |
|
| 624 | elseif (is_array($_GET)) |
|
| 625 | { |
|
| 626 | foreach ($_GET as $key => $val) |
|
| 627 | { |
|
| 628 | $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); |
|
| 629 | } |
|
| 630 | } |
|
| 631 | ||
| 632 | // Clean $_POST Data |
|
| 633 | if (is_array($_POST)) |
|
| @@ 687-695 (lines=9) @@ | ||
| 684 | */ |
|
| 685 | protected function _clean_input_data($str) |
|
| 686 | { |
|
| 687 | if (is_array($str)) |
|
| 688 | { |
|
| 689 | $new_array = array(); |
|
| 690 | foreach (array_keys($str) as $key) |
|
| 691 | { |
|
| 692 | $new_array[$this->_clean_input_keys($key)] = $this->_clean_input_data($str[$key]); |
|
| 693 | } |
|
| 694 | return $new_array; |
|
| 695 | } |
|
| 696 | ||
| 697 | /* We strip slashes if magic quotes is on to keep things consistent |
|
| 698 | ||