Handle the null path case.

This commit is contained in:
Andrew McMillan 2007-11-03 20:45:54 +13:00
parent 7736e01a0a
commit adc44b0e39

View File

@ -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 ) ) {