From 7273e1c6f961f9011bf6e20a0b702e96b367e91d Mon Sep 17 00:00:00 2001 From: j-ed Date: Tue, 16 Oct 2012 15:48:46 +0300 Subject: [PATCH] Update index.php made sure that the path is splitted into parts and and all values are properly initialized. --- index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index e29fe68..1852a25 100644 --- a/index.php +++ b/index.php @@ -88,7 +88,9 @@ // ensure that we got a valid request if ( !$path ) report_problem("Invalid request, this was not a firefox sync request!", 400); - list($version, $username, $function, $collection, $id) = explode('/', $path.'///'); + + // split path into parts and make sure that all values are properly initialized + list($version, $username, $function, $collection, $id) = array_pad(explode('/', $path.'///'), 5, ''); if($version == 'user' || $version == 'misc') {