Allow principal-property-search(-set) REPORT requests on any URL.

This commit is contained in:
Andrew McMillan 2010-08-18 21:36:06 +12:00
parent 2898fb2b23
commit eea5602c4c

View File

@ -23,10 +23,6 @@ if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['repo
}
}
$target = new DAVResource($request->path);
$target->NeedPrivilege( array('DAV::read', 'urn:ietf:params:xml:ns:caldav:read-free-busy') );
if ( !isset($request->xml_tags) ) {
$request->DoResponse( 406, translate("REPORT body contains no XML data!") );
}
@ -36,6 +32,13 @@ if ( !is_object($xmltree) ) {
$request->DoResponse( 406, translate("REPORT body is not valid XML data!") );
}
$target = new DAVResource($request->path);
if ( $xmltree->GetTag() != 'DAV::principal-property-search'
&& $xmltree->GetTag() != 'DAV::principal-property-search-set' ) {
$target->NeedPrivilege( array('DAV::read', 'urn:ietf:params:xml:ns:caldav:read-free-busy'), true ); // They may have either
}
require_once("iCalendar.php");
$reportnum = -1;
@ -44,7 +47,7 @@ $denied = array();
$unsupported = array();
if ( isset($prop_filter) ) unset($prop_filter);
if ( $xmltree->GetTag() == "urn:ietf:params:xml:ns:caldav:free-busy-query" ) {
if ( $xmltree->GetTag() == 'urn:ietf:params:xml:ns:caldav:free-busy-query' ) {
include("caldav-REPORT-freebusy.php");
exit; // Not that the above include should return anyway
}