diff options
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 20ce45244ac..9752dbf0a15 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -65,11 +65,11 @@ class Hooks { // trigger_error( "\$params['password'] = {$params['password']}" );
- $_SESSION['enckey'] = Crypt::symmetricDecryptFileContent( $encryptedKey, $params['password'] );
+ $privateKey = Crypt::symmetricDecryptFileContent( $encryptedKey, $params['password'] );
- \OC_FileProxy::$enabled = false;
- file_put_contents( '/home/samtuke/enckey', $_SESSION['enckey'] );
- \OC_FileProxy::$enabled = true;
+ $session = new Session();
+
+ $session->setPrivateKey( $privateKey, $params['uid'] );
$view1 = new \OC_FilesystemView( '/' . $params['uid'] );
@@ -81,7 +81,7 @@ class Hooks { ) {
$_SESSION['legacyenckey'] = Crypt::legacyDecrypt( $legacyKey, $params['password'] );
- trigger_error('leg enc key = '.$_SESSION['legacyenckey']);
+// trigger_error('leg enc key = '.$_SESSION['legacyenckey']);
}
// }
|