From adc44b0e39c07e0b6bdaecfb1cced7157d805ca5 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 3 Nov 2007 20:45:54 +1300 Subject: [PATCH] Handle the null path case. --- inc/CalDAVRequest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index f858ac5d..ae86d4c6 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -130,6 +130,7 @@ class CalDAVRequest * the minimum privileges returned from that analysis. */ $this->path = $_SERVER['PATH_INFO']; + if ( $this->path == null || $this->path == '' ) $this->path = '/'; // dbg_error_log( "caldav", "Sanitising path '%s'", $this->path ); $bad_chars_regex = '/[\\^\\[\\(\\\\]/'; if ( preg_match( $bad_chars_regex, $this->path ) ) {