summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-05-14 15:38:50 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-05-14 15:42:16 +0200
commit9c8eb104b6595b47bc0304f11645fca2b7290f0d (patch)
tree0a68cb0d09bbbd48d935d30c44b914eb4af33a52
parent55eb318265773c3717d36abb38f90b1feae62107 (diff)
downloadnextcloud-server-9c8eb104b6595b47bc0304f11645fca2b7290f0d.tar.gz
nextcloud-server-9c8eb104b6595b47bc0304f11645fca2b7290f0d.zip
check user permissions in calendar's changepermission.php
-rwxr-xr-xapps/calendar/ajax/share/changepermission.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/calendar/ajax/share/changepermission.php b/apps/calendar/ajax/share/changepermission.php
index e4a4f186ab0..2737420c94e 100755
--- a/apps/calendar/ajax/share/changepermission.php
+++ b/apps/calendar/ajax/share/changepermission.php
@@ -17,6 +17,14 @@ switch($idtype){
OCP\JSON::error(array('message'=>'unexspected parameter'));
exit;
}
+if($idtype == 'calendar' && !OC_Calendar_App::getCalendar($id)){
+ OCP\JSON::error(array('message'=>'permission denied'));
+ exit;
+}
+if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){
+ OCP\JSON::error(array('message'=>'permission denied'));
+ exit;
+}
$sharewith = $_GET['sharewith'];
$sharetype = strip_tags($_GET['sharetype']);
switch($sharetype){