From 9a5d517ec2d90698c98cf57cd5a12b4d1a40f53f Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 30 Sep 2011 23:10:08 +0200 Subject: [PATCH] Add more checks for admin user --- apps/admin_export/settings.php | 1 + apps/contacts/photo.php | 8 +------- settings/ajax/disableapp.php | 1 + settings/ajax/enableapp.php | 1 + tests/index.php | 3 ++- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/admin_export/settings.php b/apps/admin_export/settings.php index 565c4b3db97..8308a2b89b5 100644 --- a/apps/admin_export/settings.php +++ b/apps/admin_export/settings.php @@ -20,6 +20,7 @@ * License along with this library. If not, see . * */ +OC_Util::checkAdminUser(); OC_Util::checkAppEnabled('admin_export'); if (isset($_POST['admin_export'])) { $root = OC::$SERVERROOT . "/"; diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php index 1bdfbe3a27f..5178fe7a078 100644 --- a/apps/contacts/photo.php +++ b/apps/contacts/photo.php @@ -22,19 +22,13 @@ // Init owncloud require_once('../../lib/base.php'); +OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('contacts'); $id = $_GET['id']; $l10n = new OC_L10N('contacts'); -// Check if we are a user -if( !OC_User::isLoggedIn()){ - echo $l10n->t('You need to log in.'); - exit(); -} - - $card = OC_Contacts_VCard::find( $id ); if( $card === false ){ echo $l10n->t('Contact could not be found.'); diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php index 12f6b32a4f3..06dd3c2ac6b 100644 --- a/settings/ajax/disableapp.php +++ b/settings/ajax/disableapp.php @@ -1,6 +1,7 @@ \ No newline at end of file +?> -- 2.39.5