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:
authorringmaster <epithet@gmail.com>2013-08-26 20:08:23 +0400
committerringmaster <epithet@gmail.com>2013-09-02 17:59:00 +0400
commitdf7bfa4bf03646a4f62758c1b7745e06790ce58d (patch)
tree1ec773a4641e41086b9c11bed41f391687b2a12b /apps/files_encryption/hooks
parent9a263a500abb6e6eaf482fcb962fcd9d652e076c (diff)
Don't cache the pkey, skip generation if the keyfile exists
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r--apps/files_encryption/hooks/hooks.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index de306462d79..85169e6a1d0 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -36,14 +36,6 @@ class Hooks {
*/
public static function login($params) {
$l = new \OC_L10N('files_encryption');
- //check if all requirements are met
- if(!Helper::checkRequirements() || !Helper::checkConfiguration() ) {
- $error_msg = $l->t("Missing requirements.");
- $hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
- \OC_App::disable('files_encryption');
- \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
- \OCP\Template::printErrorPage($error_msg, $hint);
- }
$view = new \OC_FilesystemView('/');
@@ -54,6 +46,15 @@ class Hooks {
$util = new Util($view, $params['uid']);
+ //check if all requirements are met
+ if(!$util->ready() && (!Helper::checkRequirements() || !Helper::checkConfiguration())) {
+ $error_msg = $l->t("Missing requirements.");
+ $hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
+ \OC_App::disable('files_encryption');
+ \OCP\Util::writeLog('Encryption library', $error_msg . ' ' . $hint, \OCP\Util::ERROR);
+ \OCP\Template::printErrorPage($error_msg, $hint);
+ }
+
// setup user, if user not ready force relogin
if (Helper::setupUser($util, $params['password']) === false) {
return false;