diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-04 10:26:02 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-04 10:26:02 +0200 |
commit | 4ab77f90d2645f503f077903020c6bd56415294a (patch) | |
tree | 621250352a8da7db1112f08b1bcaf7b4b3676b0e /apps/files_encryption/hooks/hooks.php | |
parent | 9e31118675d425b99eff340ec7517e478ebc9fcf (diff) | |
parent | 917f389747dc3b8b3d5b9ff326a2cee21579f58a (diff) | |
download | nextcloud-server-4ab77f90d2645f503f077903020c6bd56415294a.tar.gz nextcloud-server-4ab77f90d2645f503f077903020c6bd56415294a.zip |
Merge pull request #8662 from owncloud/f-lock
f-lock
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 8fae901fe63..d1ee4a97d15 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -99,12 +99,14 @@ class Hooks { // Set legacy encryption key if it exists, to support
// depreciated encryption system
- $encLegacyKey = $userView->file_get_contents('encryption.key');
- if ($encLegacyKey) {
+ if ($userView->file_exists('encryption.key')) {
+ $encLegacyKey = $userView->file_get_contents('encryption.key');
+ if ($encLegacyKey) {
- $plainLegacyKey = Crypt::legacyDecrypt($encLegacyKey, $params['password']);
+ $plainLegacyKey = Crypt::legacyDecrypt($encLegacyKey, $params['password']);
- $session->setLegacyKey($plainLegacyKey);
+ $session->setLegacyKey($plainLegacyKey);
+ }
}
// Encrypt existing user files
|