diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-22 15:18:22 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-22 15:18:22 +0100 |
commit | ed0c99ef149d63a350c7ffcb87d398b90ed3b0a2 (patch) | |
tree | b4270fd043f15cbc8c98a3787673ad5eb879b5e0 /apps/files_encryption | |
parent | 1a9ded981b130b3917e6665dc23be33d5a6ae2e0 (diff) | |
download | nextcloud-server-ed0c99ef149d63a350c7ffcb87d398b90ed3b0a2.tar.gz nextcloud-server-ed0c99ef149d63a350c7ffcb87d398b90ed3b0a2.zip |
make sure we always have the encryption key unlocked
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/appinfo/app.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index 82d2544dd14..23f3955aa40 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -9,3 +9,9 @@ OC_FileProxy::register(new OC_FileProxy_Encryption()); OC_Hook::connect('OC_User','post_login','OC_Crypt','loginListener'); stream_wrapper_register('crypt','OC_CryptStream'); + +if(!isset($_SESSION['enckey']) and OC_User::isLoggedIn()){//force the user to re-loggin if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled) + OC_User::logout(); + header("Location: ".OC::$WEBROOT.'/'); + exit(); +} |