summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-27 11:10:45 +0100
committerVincent Petry <pvince81@owncloud.com>2014-02-27 11:10:45 +0100
commit577e47e207913554f855a4bfba13e6e7226ccaa9 (patch)
treeaf2597387316f8ed44769f09a63940ceb3fb739f /apps
parent9e59e64c793488ea3db8a61ac9e5978426878668 (diff)
parent86b3cdc132a2ae19caf327985d5613a58804d1b5 (diff)
downloadnextcloud-server-577e47e207913554f855a4bfba13e6e7226ccaa9.tar.gz
nextcloud-server-577e47e207913554f855a4bfba13e6e7226ccaa9.zip
Merge pull request #7432 from owncloud/enc_cleanup_session_after_decrypt_all
close encryption session after decryption was finished
Diffstat (limited to 'apps')
-rw-r--r--apps/files_encryption/lib/session.php8
-rw-r--r--apps/files_encryption/lib/util.php8
2 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index aa58e33e9d2..3daaa06425f 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -134,6 +134,14 @@ class Session {
}
+ /**
+ * @brief remove encryption keys and init status from session
+ */
+ public function closeSession() {
+ \OC::$session->remove('encryptionInitialized');
+ \OC::$session->remove('privateKey');
+ }
+
/**
* @brief Gets status if we already tried to initialize the encryption app
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index ec06bd52f5e..6bf69cd8ee1 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -1772,4 +1772,12 @@ class Util {
return $session;
}
+ /*
+ * @brief remove encryption related keys from the session
+ */
+ public function closeEncryptionSession() {
+ $session = new \OCA\Encryption\Session($this->view);
+ $session->closeSession();
+ }
+
}