]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disable enhancedauth by default
authorLukas Reschke <lukas@statuscode.ch>
Mon, 22 Oct 2012 21:04:39 +0000 (23:04 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 22 Oct 2012 21:04:39 +0000 (23:04 +0200)
Admins can still enable it via config.php

lib/json.php
lib/util.php

index cc504907261a59ca51fc855ac3f3d9cb93348c25..cc6cee6caff8af2d51a16d8a01011d587f7a1bd7 100644 (file)
@@ -83,7 +83,7 @@ class OC_JSON{
        * Check if the user verified the login with his password
        */
        public static function verifyUser() {
-               if(OC_Config::getValue('enhancedauth', true) === true) {
+               if(OC_Config::getValue('enhancedauth', false) === true) {
                        if(!isset($_SESSION['verifiedLogin']) OR $_SESSION['verifiedLogin'] < time()) {
                                $l = OC_L10N::get('lib');
                                self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
index a847c02872e77c3aaf1dd161821dcb2403d03dca..c5f41be324b8f0aaf9088eb436ce1b8ba1f47d54 100755 (executable)
@@ -398,7 +398,7 @@ class OC_Util {
        * If not, the user will be shown a password verification page
        */
        public static function verifyUser() {
-               if(OC_Config::getValue('enhancedauth', true) === true) {
+               if(OC_Config::getValue('enhancedauth', false) === true) {
                                        // Check password to set session
                        if(isset($_POST['password'])) {
                                if (OC_User::login(OC_User::getUser(), $_POST["password"] ) === true) {
@@ -419,12 +419,12 @@ class OC_Util {
        * @return bool
        */
        public static function isUserVerified() {
-               if(OC_Config::getValue('enhancedauth', true) === true) {
+               if(OC_Config::getValue('enhancedauth', false) === true) {
                        if(!isset($_SESSION['verifiedLogin']) OR $_SESSION['verifiedLogin'] < time()) {
                                return false;
                        }
-                       return true;
                }
+               return true;
        }
        
        /**