diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-23 14:49:53 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-23 14:49:53 +0200 |
commit | 716613fda4493770fe77510ef182dd0511643200 (patch) | |
tree | 49d9bcd5b401b4992a1077252ce7631428e397ca | |
parent | 77a4b1609bd80b29d0b90e8430fad853b2bee0be (diff) | |
parent | f2629142b07a38b11869116750177cd316da6064 (diff) | |
download | nextcloud-server-716613fda4493770fe77510ef182dd0511643200.tar.gz nextcloud-server-716613fda4493770fe77510ef182dd0511643200.zip |
Merge branch 'stable6' into backport-11211-stable6
Conflicts:
config/config.sample.php
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 15 | ||||
-rwxr-xr-x | config/config.sample.php | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 894ad311616..f843d8a9bf8 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -195,19 +195,22 @@ class Hooks { if (Crypt::mode() === 'server') {
$view = new \OC_FilesystemView('/');
+ $session = new \OCA\Encryption\Session($view);
- if ($params['uid'] === \OCP\User::getUser()) {
+ // Get existing decrypted private key
+ $privateKey = $session->getPrivateKey();
- $session = new \OCA\Encryption\Session($view);
-
- // Get existing decrypted private key
- $privateKey = $session->getPrivateKey();
+ if ($params['uid'] === \OCP\User::getUser() && $privateKey) {
// Encrypt private key with new user pwd as passphrase
$encryptedPrivateKey = Crypt::symmetricEncryptFileContent($privateKey, $params['password']);
// Save private key
- Keymanager::setPrivateKey($encryptedPrivateKey);
+ if ($encryptedPrivateKey) {
+ Keymanager::setPrivateKey($encryptedPrivateKey);
+ } else {
+ \OCP\Util::writeLog('files_encryption', 'Could not update users encryption password', \OCP\Util::ERROR);
+ }
// NOTE: Session does not need to be updated as the
// private key has not changed, only the passphrase
diff --git a/config/config.sample.php b/config/config.sample.php index dfb7a227404..fda536fab6e 100755 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -242,7 +242,7 @@ $CONFIG = array( /* custom path for libreoffice / openoffice binary */ 'preview_libreoffice_path' => '/usr/bin/libreoffice', /* cl parameters for libreoffice / openoffice */ -'preview_office_cl_parameters' => '', +'preview_office_cl_parameters' => ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ', /** * Only register providers that have been explicitly enabled * |