From 0f266872561c32633837bc479a42f3c58a6d8781 Mon Sep 17 00:00:00 2001 From: erickson Date: Sat, 31 May 2008 14:32:49 +0000 Subject: [PATCH] added some input scrubbing on limit and offset git-svn-id: svn://svn.open-ils.org/ILS/trunk@9749 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 e6640c4984..5ddd0087ed 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -758,6 +758,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.43.2