summaryrefslogtreecommitdiffstats
path: root/rpc.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-29 09:01:40 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-29 09:01:40 +0000
commit8223eed3290bc66d0a32b1706d20920a579176c4 (patch)
tree409f9e4dc69cd421afc9e3f9dc1224adee4fbbbf /rpc.php
parenta1dbbbd01af8cb154d694fefc0527bbee0c6f05c (diff)
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
Diffstat (limited to 'rpc.php')
-rw-r--r--rpc.php9
1 files changed, 8 insertions, 1 deletions
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':