diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-05-13 17:26:21 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-05-13 17:26:21 +0200 |
commit | 517efdf952526ce0f0a03107874baca18742c49b (patch) | |
tree | 0e7f10e0808c13b9142bdbdffa993bd5ca8cf2bc /apps/files_encryption/lib/session.php | |
parent | 2f4ba9d1e8ca6406abb509ad82869cfb6aca40c1 (diff) | |
download | nextcloud-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.php | 10 |
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; |