diff options
author | Sam Tuke <samtuke@owncloud.com> | 2012-08-15 18:49:53 +0100 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2012-08-15 18:49:53 +0100 |
commit | f11f524dfa17071dbabb2f950680966867f262a6 (patch) | |
tree | 4c7af641f96585d7d76066cc54e13db0626868d8 /apps/files_encryption/hooks | |
parent | b883bb6b42ab64792fa6d9c299dd2aa0f652fb3a (diff) | |
download | nextcloud-server-f11f524dfa17071dbabb2f950680966867f262a6.tar.gz nextcloud-server-f11f524dfa17071dbabb2f950680966867f262a6.zip |
working on streaming decrypted content
applied some dependency injection to keymanager.php
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index e23e3a09d46..b37c974b9c1 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -39,6 +39,8 @@ class Hooks { if ( Crypt::mode( $params['uid'] ) == 'server' ) {
+ # TODO: use lots of dependency injection here
+
$view = new \OC_FilesystemView( '/' );
$util = new Util( $view, $params['uid'] );
@@ -49,8 +51,12 @@ class Hooks { }
- $encryptedKey = Keymanager::getPrivateKey( $params['uid'] );
+ \OC_FileProxy::$enabled = false;
+
+ $encryptedKey = Keymanager::getPrivateKey( $params['uid'], $view );
+ \OC_FileProxy::$enabled = true;
+
$_SESSION['enckey'] = Crypt::symmetricDecryptFileContent( $encryptedKey, $params['password'] );
}
|