diff options
author | Sam Tuke <samtuke@owncloud.com> | 2012-12-11 15:10:56 +0000 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2012-12-11 15:10:56 +0000 |
commit | a00dd2d5d6ba908e230af4b555ed0bc902cafd15 (patch) | |
tree | 8ce450fe571976393acd5ee2d6ccd2ad145614b8 /apps/files_encryption/appinfo/app.php | |
parent | b66d38ecae3a2e7914520a90c5ef01cbc1432c10 (diff) | |
download | nextcloud-server-a00dd2d5d6ba908e230af4b555ed0bc902cafd15.tar.gz nextcloud-server-a00dd2d5d6ba908e230af4b555ed0bc902cafd15.zip |
Revert "Revert "Development snapshot""
This reverts commit b66d38ecae3a2e7914520a90c5ef01cbc1432c10.
Diffstat (limited to 'apps/files_encryption/appinfo/app.php')
-rw-r--r-- | apps/files_encryption/appinfo/app.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index 45f43d70ff0..6c082b1938c 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -6,6 +6,7 @@ OC::$CLASSPATH['OCA\Encryption\Util'] = 'apps/files_encryption/lib/util.php'; OC::$CLASSPATH['OCA\Encryption\Keymanager'] = 'apps/files_encryption/lib/keymanager.php'; OC::$CLASSPATH['OCA\Encryption\Stream'] = 'apps/files_encryption/lib/stream.php'; OC::$CLASSPATH['OCA\Encryption\Proxy'] = 'apps/files_encryption/lib/proxy.php'; +OC::$CLASSPATH['OCA\Encryption\Session'] = 'apps/files_encryption/lib/session.php'; OC_FileProxy::register(new OCA\Encryption\Proxy()); @@ -15,7 +16,13 @@ OCP\Util::connectHook('OC_User','post_setPassword','OCA\Encryption\Hooks','setPa stream_wrapper_register( 'crypt', 'OCA\Encryption\Stream'); -if( !isset( $_SESSION['enckey'] ) && OCP\User::isLoggedIn() && OCA\Encryption\Crypt::mode() == 'server' ) { +$session = new OCA\Encryption\Session(); + +if ( +! $session->getPrivateKey( \OCP\USER::getUser() ) +&& OCP\User::isLoggedIn() +&& OCA\Encryption\Crypt::mode() == 'server' +) { // Force the user to re-log in if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled) OCP\User::logout(); |