Code Duplication    Length = 9-9 lines in 3 locations

htdocs/xoops_lib/modules/protector/class/protector.php 3 locations

@@ 732-740 (lines=9) @@
729
            $this->_done_intval = true;
730
        }
731
732
        foreach ($_GET as $key => $val) {
733
            if (substr($key, -2) === 'id' && !is_array($_GET[$key])) {
734
                $newval     = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
735
                $_GET[$key] = $HTTP_GET_VARS[$key] = $newval;
736
                if ($_REQUEST[$key] == $_GET[$key]) {
737
                    $_REQUEST[$key] = $newval;
738
                }
739
            }
740
        }
741
        foreach ($_POST as $key => $val) {
742
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
743
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 741-749 (lines=9) @@
738
                }
739
            }
740
        }
741
        foreach ($_POST as $key => $val) {
742
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
743
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
744
                $_POST[$key] = $HTTP_POST_VARS[$key] = $newval;
745
                if ($_REQUEST[$key] == $_POST[$key]) {
746
                    $_REQUEST[$key] = $newval;
747
                }
748
            }
749
        }
750
        foreach ($_COOKIE as $key => $val) {
751
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
752
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 750-758 (lines=9) @@
747
                }
748
            }
749
        }
750
        foreach ($_COOKIE as $key => $val) {
751
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
752
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
753
                $_COOKIE[$key] = $HTTP_COOKIE_VARS[$key] = $newval;
754
                if ($_REQUEST[$key] == $_COOKIE[$key]) {
755
                    $_REQUEST[$key] = $newval;
756
                }
757
            }
758
        }
759
760
        return true;
761
    }