expand-property repord - prevent infinite recursion and recursion to the object itself (non-recursive getting request URL properties)

This commit is contained in:
Ján Máté 2014-05-14 13:33:36 +02:00
parent 31af435cec
commit 822e81644d

View File

@ -71,6 +71,8 @@ function expand_properties( $urls, $ptree, &$reply, $recurse_again = true ) {
$paths = array(); $paths = array();
foreach( $hrefs AS $k => $v ) { foreach( $hrefs AS $k => $v ) {
$content = $v->GetContent(); $content = $v->GetContent();
// 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; $paths[] = $content;
} }
// dbg_error_log('REPORT',' Found property "%s" contains hrefs "%s"', $pname, implode(', ',$paths) ); // dbg_error_log('REPORT',' Found property "%s" contains hrefs "%s"', $pname, implode(', ',$paths) );