diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8af8147d552..092fab8193d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -68,6 +68,22 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* deprecated in PHP } } +// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps +/** + * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). + * + * @param string $val Value + * @param string $type 1=GET, 0=POST, 2=PHP_SELF, 3=GET without sql reserved keywords (the less tolerant test) + * @return int >0 if there is an injection, 0 if none + * @deprecated use testSqlAndScriptInject + * @see testSqlAndScriptInject($val, $type) + */ +function test_sql_and_script_inject($val, $type) +{ + // phpcs:enable + return $this->testSqlAndScriptInject($val, $type); +} + /** * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). *