From: Georg Ehrke Date: Fri, 13 Apr 2012 21:16:28 +0000 (-0400) Subject: check permission check in share function X-Git-Tag: v4.0.0beta~244^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e0364baa85b063debb2c1248585d97cd61a8a1f;p=nextcloud-server.git check permission check in share function --- diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php index 92c3eb90d3b..2e81040b477 100644 --- a/apps/calendar/ajax/share/share.php +++ b/apps/calendar/ajax/share/share.php @@ -16,6 +16,14 @@ switch($idtype){ OC_JSON::error(array('message'=>'unexspected parameter')); exit; } +if($idtype == 'calendar' && !OC_Calendar_App::getCalendar($id)){ + OC_JSON::error(array('message'=>'permission denied')); + exit; +} +if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){ + OC_JSON::error(array('message'=>'permission denied')); + exit; +} $sharewith = $_GET['sharewith']; $sharetype = strip_tags($_GET['sharetype']); switch($sharetype){