From 126f0ddf3c86b0a68873fdf0dff4a22b9b44f7cf Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 28 Oct 2013 11:32:43 +0100 Subject: we should check if a user is logged in before we check for admin privilege --- lib/util.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index 9ba1bdb0282..da2cba1b938 100755 --- a/lib/util.php +++ b/lib/util.php @@ -404,6 +404,7 @@ class OC_Util { * Check if the user is a admin, redirects to home if not */ public static function checkAdminUser() { + \OC_Util::checkLoggedIn(); if( !OC_User::isAdminUser(OC_User::getUser())) { header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' )); exit(); -- cgit v1.2.3 From 5ca03f851ee83156d5ef3623a7579707dc52518b Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Wed, 30 Oct 2013 22:55:48 +0100 Subject: call \OC_Util::checkLoggedIn() on checkSubAdminUser() as well --- lib/util.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index da2cba1b938..12c399695dc 100755 --- a/lib/util.php +++ b/lib/util.php @@ -437,6 +437,7 @@ class OC_Util { * @return array $groups where the current user is subadmin */ public static function checkSubAdminUser() { + \OC_Util::checkLoggedIn(); if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) { header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' )); exit(); -- cgit v1.2.3