Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 709-717 (lines=9) @@
706
            $this->_done_intval = true;
707
        }
708
709
        foreach ($_GET as $key => $val) {
710
            if (substr($key, -2) === 'id' && !is_array($_GET[$key])) {
711
                $newval     = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
712
                $_GET[$key] = $HTTP_GET_VARS[$key] = $newval;
713
                if ($_REQUEST[$key] == $_GET[$key]) {
714
                    $_REQUEST[$key] = $newval;
715
                }
716
            }
717
        }
718
        foreach ($_POST as $key => $val) {
719
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
720
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 718-726 (lines=9) @@
715
                }
716
            }
717
        }
718
        foreach ($_POST as $key => $val) {
719
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
720
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
721
                $_POST[$key] = $HTTP_POST_VARS[$key] = $newval;
722
                if ($_REQUEST[$key] == $_POST[$key]) {
723
                    $_REQUEST[$key] = $newval;
724
                }
725
            }
726
        }
727
        foreach ($_COOKIE as $key => $val) {
728
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
729
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 727-735 (lines=9) @@
724
                }
725
            }
726
        }
727
        foreach ($_COOKIE as $key => $val) {
728
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
729
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
730
                $_COOKIE[$key] = $HTTP_COOKIE_VARS[$key] = $newval;
731
                if ($_REQUEST[$key] == $_COOKIE[$key]) {
732
                    $_REQUEST[$key] = $newval;
733
                }
734
            }
735
        }
736
737
        return true;
738
    }