Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 599-607 (lines=9) @@
596
            $this->_done_intval = true;
597
        }
598
599
        foreach ($_GET as $key => $val) {
600
            if (substr($key, -2) === 'id' && !is_array($_GET[$key])) {
601
                $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
602
                $_GET[$key] = $HTTP_GET_VARS[$key] = $newval;
603
                if ($_REQUEST[$key] == $_GET[$key]) {
604
                    $_REQUEST[$key] = $newval;
605
                }
606
            }
607
        }
608
        foreach ($_POST as $key => $val) {
609
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
610
                $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 608-616 (lines=9) @@
605
                }
606
            }
607
        }
608
        foreach ($_POST as $key => $val) {
609
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
610
                $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
611
                $_POST[$key] = $HTTP_POST_VARS[$key] = $newval;
612
                if ($_REQUEST[$key] == $_POST[$key]) {
613
                    $_REQUEST[$key] = $newval;
614
                }
615
            }
616
        }
617
        foreach ($_COOKIE as $key => $val) {
618
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
619
                $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
@@ 617-625 (lines=9) @@
614
                }
615
            }
616
        }
617
        foreach ($_COOKIE as $key => $val) {
618
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
619
                $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
620
                $_COOKIE[$key] = $HTTP_COOKIE_VARS[$key] = $newval;
621
                if ($_REQUEST[$key] == $_COOKIE[$key]) {
622
                    $_REQUEST[$key] = $newval;
623
                }
624
            }
625
        }
626
627
        return true;
628
    }