diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-12-03 16:52:44 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-12-09 09:47:26 +0100 |
commit | efac8ced90879f34919eb55055423523b146d33e (patch) | |
tree | ee2778caa0a8ddf5c181a590625d98081e0c7d63 /apps/files_encryption/ajax/updatePrivateKeyPassword.php | |
parent | 78a307995c510c0184d915fcab26baa3be815342 (diff) | |
download | nextcloud-server-efac8ced90879f34919eb55055423523b146d33e.tar.gz nextcloud-server-efac8ced90879f34919eb55055423523b146d33e.zip |
Update OCA\Encryption to OCA\Files_Encryption in the encryption app itself
Diffstat (limited to 'apps/files_encryption/ajax/updatePrivateKeyPassword.php')
-rw-r--r-- | apps/files_encryption/ajax/updatePrivateKeyPassword.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/files_encryption/ajax/updatePrivateKeyPassword.php b/apps/files_encryption/ajax/updatePrivateKeyPassword.php index 97da3811a0f..7161b0cff92 100644 --- a/apps/files_encryption/ajax/updatePrivateKeyPassword.php +++ b/apps/files_encryption/ajax/updatePrivateKeyPassword.php @@ -9,8 +9,6 @@ * */ -use OCA\Encryption; - \OCP\JSON::checkLoggedIn(); \OCP\JSON::checkAppEnabled('files_encryption'); \OCP\JSON::callCheck(); @@ -24,7 +22,7 @@ $oldPassword = $_POST['oldPassword']; $newPassword = $_POST['newPassword']; $view = new \OC\Files\View('/'); -$session = new \OCA\Encryption\Session($view); +$session = new \OCA\Files_Encryption\Session($view); $user = \OCP\User::getUser(); $loginName = \OC::$server->getUserSession()->getLoginName(); @@ -36,14 +34,14 @@ if ($passwordCorrect !== false) { $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; -$encryptedKey = Encryption\Keymanager::getPrivateKey($view, $user); -$decryptedKey = $encryptedKey ? \OCA\Encryption\Crypt::decryptPrivateKey($encryptedKey, $oldPassword) : false; +$encryptedKey = \OCA\Files_Encryption\Keymanager::getPrivateKey($view, $user); +$decryptedKey = $encryptedKey ? \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedKey, $oldPassword) : false; if ($decryptedKey) { - $cipher = \OCA\Encryption\Helper::getCipher(); - $encryptedKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($decryptedKey, $newPassword, $cipher); + $cipher = \OCA\Files_Encryption\Helper::getCipher(); + $encryptedKey = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($decryptedKey, $newPassword, $cipher); if ($encryptedKey) { - \OCA\Encryption\Keymanager::setPrivateKey($encryptedKey, $user); + \OCA\Files_Encryption\Keymanager::setPrivateKey($encryptedKey, $user); $session->setPrivateKey($decryptedKey); $return = true; } @@ -61,7 +59,7 @@ if ($decryptedKey) { // success or failure if ($return) { - $session->setInitialized(\OCA\Encryption\Session::INIT_SUCCESSFUL); + $session->setInitialized(\OCA\Files_Encryption\Session::INIT_SUCCESSFUL); \OCP\JSON::success(array('data' => array('message' => $l->t('Private key password successfully updated.')))); } else { \OCP\JSON::error(array('data' => array('message' => $errorMessage))); |