From 422144b68a3fc637be0b04cd7ec7391ef38049b1 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 15 Jan 2011 17:02:50 +1300 Subject: [PATCH] Fix that last fix... :-) Signed-off-by: Andrew McMillan --- htdocs/public.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/public.php b/htdocs/public.php index 2c9c61ca..e5c619ca 100644 --- a/htdocs/public.php +++ b/htdocs/public.php @@ -17,13 +17,15 @@ $session = new PublicSession(); /** A simplified DAV header in this case */ $dav = "1, 2, calendar-access"; header( "DAV: $dav"); - require_once("CalDAVRequest.php"); $request = new CalDAVRequest(); -if ( ! $request->IsPublic() - || ! isset($request->ticket) +if ( ! $request->IsPublic() && + (! isset($request->ticket) || $request->ticket->expired - || ! $request->ticket->MatchesPath($request->path) ) { + || ! $request->ticket->MatchesPath($request->path) ) ) { + dbg_error_log( "caldav", 'Public: %d, Ticket: %d, Expired: %d, Matches(%s): %d', + $request->IsPublic(), isset($request->ticket), $request->ticket->expired, $request->path, $request->ticket->MatchesPath($request->path) + ); $request->DoResponse( 403, translate('Anonymous users may only access public calendars') ); }