diff options
author | plegall <plg@piwigo.org> | 2014-11-21 12:19:21 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2014-11-21 12:19:21 +0000 |
commit | 9a53efa36a8a90b31716e39beb990c9628cfb57b (patch) | |
tree | 20bfa930ec7571500e48c71885c6b7f2a687c0c0 | |
parent | cc7c1779773302747f8b6c33140e71c7a4b25fce (diff) |
merge r30563 from trunk to branch 2.7
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/branches/2.7@30566 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; |