Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-24 15:08:55 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-30 23:45:22 +0400
commitf95da8ba592ad45b802997b74693565292524259 (patch)
treef0370d1c206350f34338baa0b475756b727aa90f /lib/util.php
parente71c7ee635728013e3b97583df838bbc96efbd01 (diff)
don't remember login if the encrypion app is enabled because the user
needs to log-in again in order to decrypt his private key with his password Conflicts: core/templates/login.php lib/util.php
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php27
1 files changed, 22 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 71921f0aedd..7657b234687 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -312,9 +312,27 @@ class OC_Util {
}
/**
- * Check for correct file permissions of data directory
- * @return array arrays with error messages and hints
- */
+ * @brief check if there are still some encrypted files stored
+ * @return boolean
+ */
+ public static function encryptedFiles() {
+ //check if encryption was enabled in the past
+ $encryptedFiles = false;
+ if (OC_App::isEnabled('files_encryption') === false) {
+ $view = new OC\Files\View('/' . OCP\User::getUser());
+ if ($view->file_exists('/files_encryption/keyfiles')) {
+ $encryptedFiles = true;
+ }
+ }
+
+ return $encryptedFiles;
+ }
+
+ /**
+ * @brief Check for correct file permissions of data directory
+ * @paran string $dataDirectory
+ * @return array arrays with error messages and hints
+ */
public static function checkDataDirectoryPermissions($dataDirectory) {
$errors = array();
if (stristr(PHP_OS, 'WIN')) {
@@ -354,6 +372,7 @@ class OC_Util {
}
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
+ $parameters['encryption_enabled'] = OC_App::isEnabled('files_encryption');
OC_Template::printGuestPage("", "login", $parameters);
}
@@ -536,7 +555,6 @@ class OC_Util {
return $value;
}
-
/**
* Check if the htaccess file is working by creating a test file in the data directory and trying to access via http
*/
@@ -677,7 +695,6 @@ class OC_Util {
}
}
-
}
/**