diff --git a/objects/security.php b/objects/security.php old mode 100644 new mode 100755 index b7acb67e3..6e12bd812 --- a/objects/security.php +++ b/objects/security.php @@ -1,62 +1,62 @@ $value) { if (is_string($_POST[$value][$key])) { $_POST[$value][$key] = str_replace("'","",trim($_POST[$value][$key])); } } } } if (!empty($_GET[$value])) { if (is_string($_GET[$value])) { $_GET[$value] = str_replace("'","",trim($_GET[$value])); } else if (is_array($_GET[$value])) { foreach ($_GET[$value] as $key => $value) { if (is_string($_GET[$value][$key])) { $_GET[$value][$key] = str_replace("'","",trim($_GET[$value][$key])); } } } } } foreach ($securityFilterInt as $value) { if (!empty($_POST[$value])) { $_POST[$value] = intval($_POST[$value]); } if (!empty($_GET[$value])) { $_GET[$value] = intval($_GET[$value]); } } foreach ($securityFilter as $value) { if (!empty($_POST[$value])) { $_POST[$value] = str_replace(array("'", '"', """, "'"), array('', '', '', ''), xss_esc($_POST[$value])); } if (!empty($_GET[$value])) { $_GET[$value] = str_replace(array("'", '"', """, "'"), array('', '', '', ''), xss_esc($_GET[$value])); } } if (!empty($_GET['sort']) && is_array($_GET['sort'])) { foreach ($_GET['sort'] as $key => $value) { $_GET['sort'][xss_esc($key)] = strcasecmp($value, "ASC") === 0 ? "ASC" : "DESC"; } } if (!empty($_POST['sort']) && is_array($_POST['sort'])) { foreach ($_POST['sort'] as $key => $value) { $_POST['sort'][xss_esc($key)] = strcasecmp($value, "ASC") === 0 ? "ASC" : "DESC"; } } \ No newline at end of file