aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-12 22:11:48 -0400
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-12 22:11:48 -0400
commita7908ba76bd1b973a180eef4adbebbf2d9a1364f (patch)
tree0c8c3b0308afda75e51a1936d8481694d1e1accf /apps
parent0f16935763c56ef327dcbb52d45a344cf6842dc4 (diff)
downloadnextcloud-server-a7908ba76bd1b973a180eef4adbebbf2d9a1364f.tar.gz
nextcloud-server-a7908ba76bd1b973a180eef4adbebbf2d9a1364f.zip
fix bugs in share class
Diffstat (limited to 'apps')
-rw-r--r--apps/calendar/lib/share.php3
-rw-r--r--apps/calendar/share.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/calendar/lib/share.php b/apps/calendar/lib/share.php
index 6a4e1a6f1cf..40f220fcaab 100644
--- a/apps/calendar/lib/share.php
+++ b/apps/calendar/lib/share.php
@@ -130,7 +130,7 @@ class OC_Calendar_Share{
}else{
$string = OC_Calendar_Object::find($id);
}
- $string = sha1($string);
+ $string = sha1($string['calendardata']);
$id = sha1($id);
$array = array($uniqid,$string,$id);
shuffle($array);
@@ -245,5 +245,6 @@ class OC_Calendar_Share{
$event = $result_event->fetchRow();
$return ['id'] = $event['eventid'];
}
+ return $return;
}
} \ No newline at end of file
diff --git a/apps/calendar/share.php b/apps/calendar/share.php
index 3e45fdeee15..2ba50d9cf21 100644
--- a/apps/calendar/share.php
+++ b/apps/calendar/share.php
@@ -18,4 +18,6 @@ if($shared['type'] == OC_Calendar_Share::CALENDAR){
header('Content-Type: text/Calendar');
header('Content-Disposition: inline; filename=' . $data['summary'] . '.ics');
echo $data['calendardata'];
+}else{
+ header('Error 404: Not Found');
} \ No newline at end of file