From 02f57ef1108de7d4ce73647302d75fc0cb377d39 Mon Sep 17 00:00:00 2001 From: erickson Date: Sat, 31 May 2008 14:31:59 +0000 Subject: [PATCH] added some input scrubbing on limit and offset git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_2@9747 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index 8228f690c4..1671861668 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -693,6 +693,9 @@ sub staged_search { my $user_offset = $search_hash->{offset} || 0; # user-specified offset my $user_limit = $search_hash->{limit} || 10; + $user_offset = ($user_offset >= 0) ? $user_offset : 0; + $user_limit = ($user_limit >= 0) ? $user_limit : 10; + # we're grabbing results on a per-superpage basis, which means the # limit and offset should coincide with superpage boundaries -- 2.11.0