From 801eba74c552d5fd5de8de9209034cadfc461460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 2 Sep 2018 18:58:11 +0200 Subject: [PATCH] deprecated test_sql_and_script --- htdocs/main.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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). *