Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 742-750 (lines=9) @@
739
            $this->_done_intval = true;
740
        }
741
742
        foreach ($_GET as $key => $val) {
743
            if (substr($key, -2) === 'id' && !is_array($_GET[$key])) {
744
                $newval     = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
745
                $_GET[$key] = $HTTP_GET_VARS[$key] = $newval;
746
                if ($_REQUEST[$key] == $_GET[$key]) {
747
                    $_REQUEST[$key] = $newval;
748
                }
749
            }
750
        }
751
        foreach ($_POST as $key => $val) {
752
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
753
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 751-759 (lines=9) @@
748
                }
749
            }
750
        }
751
        foreach ($_POST as $key => $val) {
752
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
753
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
754
                $_POST[$key] = $HTTP_POST_VARS[$key] = $newval;
755
                if ($_REQUEST[$key] == $_POST[$key]) {
756
                    $_REQUEST[$key] = $newval;
757
                }
758
            }
759
        }
760
        foreach ($_COOKIE as $key => $val) {
761
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
762
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 760-768 (lines=9) @@
757
                }
758
            }
759
        }
760
        foreach ($_COOKIE as $key => $val) {
761
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
762
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
763
                $_COOKIE[$key] = $HTTP_COOKIE_VARS[$key] = $newval;
764
                if ($_REQUEST[$key] == $_COOKIE[$key]) {
765
                    $_REQUEST[$key] = $newval;
766
                }
767
            }
768
        }
769
770
        return true;
771
    }