com web/bugs: Fixed bug #64020 (reject negative values for the limit value): include/query.php
| From: | Ferenc Kovacs | Date: | Fri, 18 Jan 2013 14:31:04 +0000 |
| Subject: | com web/bugs: Fixed bug #64020 (reject negative values for the limit value): include/query.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15339@lists.php.net to get a copy of this message | ||
Commit: dcc9d0e39e2356cc69b29d73a2cb05468da0b951
Author: Ferenc Kovacs <tyra3l@gmail.com> Fri, 18 Jan 2013 15:31:04 +0100
Parents: 688153af0567592a26f72231e9bb3a9585d12f19
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=dcc9d0e39e2356cc69b29d73a2cb05468da0b951
Log:
Fixed bug #64020 (reject negative values for the limit value)
Bugs:
https://bugs.php.net/64020
Changed paths:
M include/query.php
Diff:
diff --git a/include/query.php b/include/query.php
index bcc0347..783a6fc 100644
--- a/include/query.php
+++ b/include/query.php
@@ -36,7 +36,7 @@ $cve_id = !empty($_GET['cve_id']) ? $_GET['cve_id'] :
'';
$cve_id_not = !empty($_GET['cve_id_not']) ? 'not' : '';
$patch = !empty($_GET['patch']) ? $_GET['patch'] : '';
$private = !empty($_GET['private']) ? $_GET['private'] : '';
-$begin = (int) (!empty($_GET['begin']) ? $_GET['begin'] : 0);
+$begin = (int) ((!empty($_GET['begin']) && $_GET['begin'] > 0) ?
$_GET['begin'] : 0);
$limit = (defined('MAX_BUGS_RETURN')) ? MAX_BUGS_RETURN : 30;
$project = (!empty($_GET['project']) && $_GET['project'] !=
'All') ? $_GET['project'] : '';
if (!empty($_GET['limit'])) {