mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-01 09:49:32 +00:00
Merge branch 'fix-vcard-read-free-busy-403' into 'master'
Return 403 instead of 500 for a vCard read with only read-free-busy See merge request davical-project/davical!152
This commit is contained in:
commit
48488567e5
@ -54,6 +54,10 @@ if ( $dav_resource->HavePrivilegeTo('all', false) || $session->user_no == $resou
|
||||
else if ( $resource->class != 'PRIVATE' ) {
|
||||
$allowed = true; // but we may well obfuscate it below
|
||||
if ( ! $dav_resource->HavePrivilegeTo('DAV::read') || ( $resource->class == 'CONFIDENTIAL' && ! $request->HavePrivilegeTo('DAV::write-content') ) ) {
|
||||
if ( $resource->caldav_type == 'VCARD' ) {
|
||||
// Free/busy access covers calendar data only; a vCard has no busy time to show.
|
||||
$request->DoResponse( 403, translate("Forbidden") );
|
||||
}
|
||||
$ical = new iCalComponent( $resource->caldav_data );
|
||||
$comps = $ical->GetComponents('VTIMEZONE',false);
|
||||
$confidential = obfuscated_event($comps[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user