mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
make sure we always have the encryption key unlocked
This commit is contained in:
parent
1a9ded981b
commit
ed0c99ef14
1 changed files with 6 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue