diff options
-rw-r--r-- | apps/admin_export/settings.php | 1 | ||||
-rw-r--r-- | apps/contacts/photo.php | 8 | ||||
-rw-r--r-- | settings/ajax/disableapp.php | 1 | ||||
-rw-r--r-- | settings/ajax/enableapp.php | 1 | ||||
-rw-r--r-- | 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 <http://www.gnu.org/licenses/>. * */ +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 @@ <?php // Init owncloud require_once('../../lib/base.php'); +OC_JSON::checkAdminUser(); OC_JSON::setContentTypeHeader(); OC_App::disable($_POST['appid']); diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php index 8be80cd2ece..639df2aecc0 100644 --- a/settings/ajax/enableapp.php +++ b/settings/ajax/enableapp.php @@ -2,6 +2,7 @@ // Init owncloud require_once('../../lib/base.php'); +OC_JSON::checkAdminUser(); OC_JSON::setContentTypeHeader(); OC_App::enable($_POST['appid']); diff --git a/tests/index.php b/tests/index.php index efa730f6f8f..08e53f1a575 100644 --- a/tests/index.php +++ b/tests/index.php @@ -26,6 +26,7 @@ */ $RUNTIME_NOSETUPFS=true; require_once('../lib/base.php'); +OC_Util::checkAdminUser(); $testCases=loadFiles(__DIR__,array('index.php','templates')); ob_end_clean(); @@ -74,4 +75,4 @@ function loadFiles($path,$exclude=false){ } return $results; } -?>
\ No newline at end of file +?> |