mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-18 04:13:38 +00:00
Recognise and error when the request says it has XML, but it
has errors.
This commit is contained in:
parent
c7c6a0a62c
commit
9a51be75be
@ -26,6 +26,11 @@ if ( ! ($request->AllowedTo('read') || $request->AllowedTo('freebusy')) ) {
|
||||
if ( !isset($request->xml_tags) ) {
|
||||
$request->DoResponse( 403, "REPORT body contains no XML data!" );
|
||||
}
|
||||
$position = 0;
|
||||
$xmltree = BuildXMLTree( $request->xml_tags, $position);
|
||||
if ( !is_object($xmltree) ) {
|
||||
$request->DoResponse( 403, "REPORT body is not valid XML data!" );
|
||||
}
|
||||
|
||||
require_once("iCalendar.php");
|
||||
|
||||
@ -35,8 +40,6 @@ $denied = array();
|
||||
$unsupported = array();
|
||||
if ( isset($prop_filter) ) unset($prop_filter);
|
||||
|
||||
$position = 0;
|
||||
$xmltree = BuildXMLTree( $request->xml_tags, $position);
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user