diff --git a/inc/caldav-REPORT-expand-property.php b/inc/caldav-REPORT-expand-property.php index c119c6f3..ba5a8f9f 100644 --- a/inc/caldav-REPORT-expand-property.php +++ b/inc/caldav-REPORT-expand-property.php @@ -71,7 +71,9 @@ function expand_properties( $urls, $ptree, &$reply, $recurse_again = true ) { $paths = array(); foreach( $hrefs AS $k => $v ) { $content = $v->GetContent(); - $paths[] = $content; + // prevent infinite recursion and recursion to the object itself (non-recursive getting request URL properties) + if($content[0]=='/' && $content!='/caldav.php'.str_replace( '%2F', '/', rawurlencode($url))) + $paths[] = $content; } // dbg_error_log('REPORT',' Found property "%s" contains hrefs "%s"', $pname, implode(', ',$paths) ); $property->SetContent( expand_properties($paths, $subtrees[$pname], $reply, false) );