From ef6785f31ebbe2f4e509ff03b04f34bea60f1c45 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 30 Apr 2007 07:45:04 +1200 Subject: [PATCH] No need to use preg_split here, since PHP has already cleaned any paired slashes down to singletons. --- inc/CalDAVRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 38fb7a1d..c9c0d1dc 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -95,6 +95,7 @@ class CalDAVRequest * the minimum privileges returned from that analysis. */ $this->path = $_SERVER['PATH_INFO']; + // dbg_error_log( "caldav", "Sanitising path '%s'", $this->path ); $bad_chars_regex = '/[\\^\\[\\(\\\\]/'; if ( preg_match( $bad_chars_regex, $this->path ) ) { $this->DoResponse( 400, translate("The calendar path contains illegal characters.") ); @@ -115,7 +116,7 @@ class CalDAVRequest } } - $path_split = preg_split('#/+#', $this->path ); + $path_split = explode('/', $this->path ); $this->permissions = array(); if ( !isset($path_split[1]) || $path_split[1] == '' ) { dbg_error_log( "caldav", "No useful path split possible" );