]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't remember login if the encrypion app is enabled because the user
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 24 Sep 2013 11:08:55 +0000 (13:08 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 24 Sep 2013 11:08:55 +0000 (13:08 +0200)
needs to log-in again in order to decrypt his private key with his password

core/templates/login.php
lib/base.php
lib/util.php

index ee761f0aa523d5378f8a345379613af19fe90a46..3e736f164ec60d7742fe7118dba9eb96e77aca09 100644 (file)
                        <?php p($l->t('Lost your password?')); ?>
                </a>
                <?php endif; ?>
-
+               <?php if ($_['encryption_enabled'] === false) : ?>
                <input type="checkbox" name="remember_login" value="1" id="remember_login" checked />
                <label for="remember_login"><?php p($l->t('remember')); ?></label>
+               <?php endif; ?>
                <input type="hidden" name="timezone-offset" id="timezone-offset"/>
                <input type="submit" id="submit" class="login primary" value="<?php p($l->t('Log in')); ?>"/>
        </fieldset>
index 395d8486a5eaaa5c2844fd25b8f871d5b389a78a..b4e12bc7ebbb316c8401491dcd486d8b16cbf909 100644 (file)
@@ -760,6 +760,7 @@ class OC {
                        || !isset($_COOKIE["oc_token"])
                        || !isset($_COOKIE["oc_username"])
                        || !$_COOKIE["oc_remember_login"]
+                       || OC_App::isEnabled('files_encryption')
                ) {
                        return false;
                }
index 41f5f1d16be3164c29e0a293a9ae8af2a67677d5..ef42ff2aea984c6784c3c315d81012472f41a8ee 100755 (executable)
@@ -414,10 +414,10 @@ class OC_Util {
                                $encryptedFiles = true;
                        }
                }
-               
+
                return $encryptedFiles;
        }
-       
+
        /**
         * @brief Check for correct file permissions of data directory
         * @paran string $dataDirectory
@@ -467,6 +467,7 @@ class OC_Util {
                }
 
                $parameters['alt_login'] = OC_App::getAlternativeLogIns();
+               $parameters['encryption_enabled'] = OC_App::isEnabled('files_encryption');
                OC_Template::printGuestPage("", "login", $parameters);
        }
 
@@ -654,16 +655,16 @@ class OC_Util {
                }
                return $value;
        }
-       
+
        /**
         * @brief Public function to encode url parameters
         *
         * This function is used to encode path to file before output.
         * Encoding is done according to RFC 3986 with one exception:
-        * Character '/' is preserved as is. 
+        * Character '/' is preserved as is.
         *
         * @param string $component part of URI to encode
-        * @return string 
+        * @return string
         */
        public static function encodePath($component) {
                $encoded = rawurlencode($component);
@@ -810,7 +811,7 @@ class OC_Util {
                        }
                }
        }
-       
+
        /**
         * @brief Check if the connection to the internet is disabled on purpose
         * @return bool