diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-28 17:04:35 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-28 17:04:35 +0200 |
commit | 6ae7bde78849829e2f439dd06a8ff87ab6339450 (patch) | |
tree | f7b2ede56076cd2a61f28d6cd476046cf54b1fc7 /apps | |
parent | cc0cf931365d0c515038015bc7792f8500fafcc3 (diff) | |
download | nextcloud-server-6ae7bde78849829e2f439dd06a8ff87ab6339450.tar.gz nextcloud-server-6ae7bde78849829e2f439dd06a8ff87ab6339450.zip |
fixed encryption session namespace to avoid problems
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 8 | ||||
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 6 | ||||
-rw-r--r-- | apps/files_encryption/lib/stream.php | 2 | ||||
-rw-r--r-- | apps/files_encryption/lib/util.php | 2 | ||||
-rwxr-xr-x | apps/files_encryption/tests/crypt.php | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 9af1f2c6459..0ef796dbaef 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -57,7 +57,7 @@ class Hooks { $privateKey = Crypt::symmetricDecryptFileContent( $encryptedKey, $params['password'] );
- $session = new Session( $view );
+ $session = new \OCA\Encryption\Session( $view );
$session->setPrivateKey( $privateKey, $params['uid'] );
@@ -151,7 +151,7 @@ class Hooks { $view = new \OC_FilesystemView('/');
- $session = new Session($view);
+ $session = new \OCA\Encryption\Session($view);
// Get existing decrypted private key
$privateKey = $session->getPrivateKey();
@@ -266,7 +266,7 @@ class Hooks { if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
$view = new \OC_FilesystemView('/');
- $session = new Session($view);
+ $session = new \OCA\Encryption\Session($view);
$userId = \OCP\User::getUser();
$util = new Util($view, $userId);
$path = $util->fileIdToPath($params['itemSource']);
@@ -438,7 +438,7 @@ class Hooks { \OC_FileProxy::$enabled = false;
$view = new \OC_FilesystemView('/');
- $session = new Session($view);
+ $session = new \OCA\Encryption\Session($view);
$userId = \OCP\User::getUser();
$util = new Util( $view, $userId );
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 0f7eb84dc1b..e381ecab5c3 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -111,7 +111,7 @@ class Proxy extends \OC_FileProxy $userId = \OCP\USER::getUser(); $view = new \OC_FilesystemView( '/' ); $util = new Util( $view, $userId ); - $session = new Session( $view ); + $session = new \OCA\Encryption\Session( $view ); $privateKey = $session->getPrivateKey(); $filePath = $util->stripUserFilesPath( $path ); // Set the filesize for userland, before encrypting @@ -197,7 +197,7 @@ class Proxy extends \OC_FileProxy \OC_FileProxy::$enabled = false; // init session - $session = new Session( $view ); + $session = new \OCA\Encryption\Session( $view ); // If data is a catfile if ( @@ -439,7 +439,7 @@ class Proxy extends \OC_FileProxy \OC_FileProxy::$enabled = false; $view = new \OC_FilesystemView( '/' ); - $session = new Session( $view ); + $session = new \OCA\Encryption\Session( $view ); $userId = \OCP\User::getUser(); $util = new Util( $view, $userId ); diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index fa9df02f085..da8c2494139 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -228,7 +228,7 @@ class Stream // If a keyfile already exists if ( $this->encKeyfile ) { - $session = new Session( $this->rootView ); + $session = new \OCA\Encryption\Session( $this->rootView ); $privateKey = $session->getPrivateKey( $this->userId ); diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 48485cf2e86..6ffe31c9bb4 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -1420,7 +1420,7 @@ class Util { if ($item['type'] == 'dir') { $this->addRecoveryKeys($filePath . '/'); } else { - $session = new Session(new \OC_FilesystemView('/')); + $session = new \OCA\Encryption\Session(new \OC_FilesystemView('/')); $sharingEnabled = \OCP\Share::isEnabled(); $file = substr($filePath, 0, -4); $usersSharing = $this->getSharingUsersArray($sharingEnabled, $file); diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index e9f155e2649..5b0486aad8c 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -270,7 +270,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $shareKey = Encryption\Keymanager::getShareKey($this->view, $this->userId, $filename); // get session - $session = new Encryption\Session($this->view); + $session = new \OCA\Encryption\Session($this->view); // get private key $privateKey = $session->getPrivateKey($this->userId); @@ -345,7 +345,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase { $shareKey = Encryption\Keymanager::getShareKey($this->view, $this->userId, $filename); // get session - $session = new Encryption\Session($this->view); + $session = new \OCA\Encryption\Session($this->view); // get private key $privateKey = $session->getPrivateKey($this->userId); |