diff options
author | Sam Tuke <samtuke@owncloud.com> | 2013-05-01 19:18:31 +0200 |
---|---|---|
committer | Sam Tuke <samtuke@owncloud.com> | 2013-05-01 19:21:01 +0200 |
commit | ba29147e34a22142c4bfd2afa3f5b9f1e6efcd63 (patch) | |
tree | 643e10cc813c815253c78d4ab6650c42a8986c91 /apps/files_encryption/lib/session.php | |
parent | d3db4ee103903e97ec2cfb8430b14699f1f6e8ae (diff) | |
download | nextcloud-server-ba29147e34a22142c4bfd2afa3f5b9f1e6efcd63.tar.gz nextcloud-server-ba29147e34a22142c4bfd2afa3f5b9f1e6efcd63.zip |
Fixed recoveryadmin settings in user and admin settings pages (js, templates, ajax)
Renamed recovery methods in Util{} for clarity
Added note about bug causing slow page load and redundant keypair generation
recoveryAdmin functionality not yet complete
Diffstat (limited to 'apps/files_encryption/lib/session.php')
-rw-r--r-- | apps/files_encryption/lib/session.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php index 0c6a7131fd9..0e6bb96605f 100644 --- a/apps/files_encryption/lib/session.php +++ b/apps/files_encryption/lib/session.php @@ -35,22 +35,28 @@ class Session { * * The ownCloud key pair is used to allow public link sharing even if encryption is enabled */ - public function __construct( \OC_FilesystemView $view ) { + public function __construct( $view ) { $this->view = $view; if ( ! $this->view->is_dir( 'owncloud_private_key' ) ) { - $this->view->mkdir('owncloud_private_key'); + $this->view->mkdir( 'owncloud_private_key' ); + } - if ( - ! $this->view->file_exists("/public-keys/owncloud.public.key") - || ! $this->view->file_exists("/owncloud_private_key/owncloud.private.key" ) + ! $this->view->file_exists( "/public-keys/owncloud.public.key" ) + || ! $this->view->file_exists( "/owncloud_private_key/owncloud.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; |