diff options
author | plegall <plg@piwigo.org> | 2014-11-21 12:17:18 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2014-11-21 12:17:18 +0000 |
commit | 40e8427a99b6677848fe899ada68aded21895452 (patch) | |
tree | 06bb8f968654218900076bb37aded57ba77e02c4 /include/functions_rate.inc.php | |
parent | f07185fee2348e869d13d35759d3a7043ea43397 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | include/functions_rate.inc.php | 1 |
1 files changed, 1 insertions, 0 deletions
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; |