From 49257629ea039798e23a32ff0dea581d16b1c3eb Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 25 Feb 2010 09:48:38 +1300 Subject: [PATCH] It's possible for $_SERVER['PATH_INFO'] to be unset. --- htdocs/caldav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/caldav.php b/htdocs/caldav.php index 5d068f4c..fe1c6cfa 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -8,7 +8,7 @@ * @copyright Catalyst .Net Ltd, Morphoss Ltd * @license http://gnu.org/copyleft/gpl.html GNU GPL v2 or later */ -if ( preg_match( '{^(/favicon.ico|davical.css|(images|js|css)/.+)$}', $_SERVER['PATH_INFO'], $matches ) ) { +if ( isset($_SERVER['PATH_INFO']) && preg_match( '{^(/favicon.ico|davical.css|(images|js|css)/.+)$}', $_SERVER['PATH_INFO'], $matches ) ) { $filename = $_SERVER['DOCUMENT_ROOT'] . preg_replace('{(\.\.|\\\\)}', '', $matches[1]); $fh = @fopen($matches[1],'r'); if ( ! $fh ) {