aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-11-21 12:24:39 +0000
committerplegall <plg@piwigo.org>2014-11-21 12:24:39 +0000
commit062e2005d7c3886993ef146c9ca94089679f4dac (patch)
treef4b3b5f39f7f93aaf2572a363923a64425694be4 /include
parent60e31603e3f6832c02a270c013e35243c6b02107 (diff)
merge r30563 from trunk to branch 2.5
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.5@30568 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_rate.inc.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/functions_rate.inc.php b/include/functions_rate.inc.php
index d0319bd5c..b8d4a6256 100644
--- a/include/functions_rate.inc.php
+++ b/include/functions_rate.inc.php
@@ -34,6 +34,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;