From cb445deb5f986da3a785999225d28ece4d043ec5 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Thu, 5 Jan 2012 21:02:11 +0100 Subject: [PATCH] fix login check in ajax files --- apps/calendar/ajax/editeventform.php | 4 +++- apps/calendar/ajax/importdialog.php | 4 +++- apps/calendar/ajax/neweventform.php | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/calendar/ajax/editeventform.php b/apps/calendar/ajax/editeventform.php index a3870626326..95cae39c1c2 100644 --- a/apps/calendar/ajax/editeventform.php +++ b/apps/calendar/ajax/editeventform.php @@ -8,7 +8,9 @@ require_once('../../../lib/base.php'); -OC_JSON::checkLoggedIn(); +if(!OC_USER::isLoggedIn()) { + die(''); +} OC_JSON::checkAppEnabled('calendar'); $id = $_GET['id']; diff --git a/apps/calendar/ajax/importdialog.php b/apps/calendar/ajax/importdialog.php index 8d8430da7aa..983a3d95a84 100644 --- a/apps/calendar/ajax/importdialog.php +++ b/apps/calendar/ajax/importdialog.php @@ -10,7 +10,9 @@ require_once('../../../lib/base.php'); $l10n = new OC_L10N('calendar'); -OC_JSON::checkLoggedIn(); +if(!OC_USER::isLoggedIn()) { + die(''); +} OC_JSON::checkAppEnabled('calendar'); $tmpl = new OC_Template('calendar', 'part.import'); diff --git a/apps/calendar/ajax/neweventform.php b/apps/calendar/ajax/neweventform.php index 88468dd3dbf..3870c879b0e 100644 --- a/apps/calendar/ajax/neweventform.php +++ b/apps/calendar/ajax/neweventform.php @@ -8,7 +8,9 @@ require_once('../../../lib/base.php'); -OC_JSON::checkLoggedIn(); +if(!OC_USER::isLoggedIn()) { + die(''); +} OC_JSON::checkAppEnabled('calendar'); if (!isset($_POST['start'])){ -- 2.39.5