From 8223eed3290bc66d0a32b1706d20920a579176c4 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sun, 29 Jul 2007 09:01:40 +0000 Subject: issue60, input validation for provided dates via RPC or $_GET git-svn-id: file:///var/lib/svn/phpfspot/trunk@262 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- rpc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rpc.php') diff --git a/rpc.php b/rpc.php index d0a6c1c..39e2b77 100644 --- a/rpc.php +++ b/rpc.php @@ -95,7 +95,14 @@ class PHPFSPOT_RPC { break; case 'search': - $fspot->startSearch($_GET['for'], $_GET['from'], $_GET['to'], $_GET['sort_order']); + $fspot->startSearch($_GET['for'], $_GET['sort_order'], $_GET['from'], $_GET['to']); + + if((isset($_GET['from']) && $fspot->isValidDate($_GET['from'])) && + (isset($_GET['to']) && $fspot->isValidDate($_GET['to']))) { + } + else { + $fspot->startSearch($_GET['for'], $_GET['sort_order']); + } break; case 'get_export': -- cgit v1.2.3-18-g5258