[open-ils-commits] r18884 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 30 15:44:00 EST 2010
Author: gmc
Date: 2010-11-30 15:43:55 -0500 (Tue, 30 Nov 2010)
New Revision: 18884
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
protect some of the supercat browse interfaces from unboundedness
E.g., browsing from a call number that contains forward slashes, e.g.,
"02/05/2004"
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2010-11-30 20:35:09 UTC (rev 18883)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2010-11-30 20:43:55 UTC (rev 18884)
@@ -986,6 +986,7 @@
my $flesh_feed = parse_feed_type($type);
$limit ||= 10;
+ $limit = 10 if $limit !~ /^\d+$/;
my $list = $supercat->request("open-ils.supercat.$rtype.record.$axis.recent", $date, $limit)->gather(1);
@@ -1439,6 +1440,7 @@
$page_size ||= $cgi->param('count') || 9;
$page = 0 if ($page !~ /^-?\d+$/);
+ $page_size = 9 if $page_size !~ /^\d+$/;
my $prev = join('/', $base,$format,$axis,$site,$string,$page - 1,$page_size);
my $next = join('/', $base,$format,$axis,$site,$string,$page + 1,$page_size);
@@ -1503,6 +1505,7 @@
$page_size ||= $cgi->param('count') || 9;
$page = 0 if ($page !~ /^-?\d+$/);
+ $page_size = 9 if $page_size !~ /^\d+$/;
my $prev = join('/', $base,$format,$axis,$site,$string,$page - 1,$page_size);
my $next = join('/', $base,$format,$axis,$site,$string,$page + 1,$page_size);
@@ -1573,6 +1576,7 @@
$page_size ||= $cgi->param('count') || 10;
$page = 1 if ($page !~ /^-?\d+$/ || $page < 1);
+ $page_size = 10 if $page_size !~ /^\d+$/;
my $prev = join('/', $base,$format,$axis,$site,$page - 1,$page_size);
my $next = join('/', $base,$format,$axis,$site,$page + 1,$page_size);
More information about the open-ils-commits
mailing list