From 40e8427a99b6677848fe899ada68aded21895452 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 21 Nov 2014 12:17:18 +0000 Subject: bug 3178 fixed, in_array check is not reliable when you compare string (user input) and numeric values git-svn-id: http://piwigo.org/svn/trunk@30563 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_rate.inc.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/functions_rate.inc.php b/include/functions_rate.inc.php index 152a93d90..45d3e9e7f 100644 --- a/include/functions_rate.inc.php +++ b/include/functions_rate.inc.php @@ -39,6 +39,7 @@ function rate_picture($image_id, $rate) if (!isset($rate) or !$conf['rate'] + or !preg_match('/^[0-9]+$/', $rate) or !in_array($rate, $conf['rate_items'])) { return false; -- cgit v1.2.3