$val) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][addslashes($k)] = $v; $process[] = &$process[$key][addslashes($k)]; } else { $process[$key][addslashes($k)] = addslashes($v); } } } unset($process); $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); foreach ($process as $key => $val) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][htmlspecialchars($k)] = $v; $process[] = &$process[$key][htmlspecialchars($k)]; } else { $process[$key][htmlspecialchars($k)] = htmlspecialchars($v); } } } unset($process); $process = array(&$_GET, &$_POST, &$_REQUEST); manual_bfmw_secure($process); unset($process); if (isset($_GET['bfmw_orig_ticket'])) { $_GET['ticket'] = $_GET['bfmw_orig_ticket']; } function get_numeric($val) { if (is_array($val)) { foreach ($val as $key => $valeur) { $val[$key] = get_numeric($valeur); } return $val; } if (is_numeric(str_replace(",",".",$val))) { $val = str_replace(",",".",$val); return $val; } if ($val === "NULL") { return null; } return null; } function manual_bfmw_secure(&$process) { foreach ($process as $key => $val) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key]["bfmw_orig_".$k] = $v; $process[$key]["bfmw_num_".$k] = get_numeric($v); $process[] = &$process[$key]["bfmw_orig_".$k]; $process[] = &$process[$key]["bfmw_num_".$k]; } else { $process[$key]["bfmw_orig_".$k] = $v; $process[$key]["bfmw_num_".$k] = get_numeric($v); } } } } function bfmw_add_secured(array &$data,string $field,$value) { $data["bfmw_orig_".$field] = $value; $data["bfmw_num_".$field] = get_numeric($value); }