summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/session.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-05-13 17:26:21 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-05-13 17:26:21 +0200
commit517efdf952526ce0f0a03107874baca18742c49b (patch)
tree0e7f10e0808c13b9142bdbdffa993bd5ca8cf2bc /apps/files_encryption/lib/session.php
parent2f4ba9d1e8ca6406abb509ad82869cfb6aca40c1 (diff)
downloadnextcloud-server-517efdf952526ce0f0a03107874baca18742c49b.tar.gz
nextcloud-server-517efdf952526ce0f0a03107874baca18742c49b.zip
don't create a recovery user, only generate recovery key similar to the public link share key
Diffstat (limited to 'apps/files_encryption/lib/session.php')
-rw-r--r--apps/files_encryption/lib/session.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index 920f0b6a9a3..5444d0215ca 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -49,7 +49,7 @@ class Session {
$publicShareKeyId = \OC_Appconfig::getValue('files_encryption', 'publicShareKeyId');
if ($publicShareKeyId === null) {
- $publicShareKeyId = substr(md5(time()),0,8);
+ $publicShareKeyId = 'pubShare_'.substr(md5(time()),0,8);
\OC_Appconfig::setValue('files_encryption', 'publicShareKeyId', $publicShareKeyId);
}
@@ -57,13 +57,7 @@ class Session {
! $this->view->file_exists( "/public-keys/".$publicShareKeyId.".public.key" )
|| ! $this->view->file_exists( "/owncloud_private_key/".$publicShareKeyId.".private.key" )
) {
-
- //FIXME: Bug: for some reason file_exists is returning
- // false in above if statement, and causing new keys
- // to be generated on each page load. At last check
- // our app.php is being executed 18 times per page load
- // , causing 18 new keypairs and huge performance hit.
-
+
$keypair = Crypt::createKeypair();
\OC_FileProxy::$enabled = false;