diff --git a/VERSION.json b/VERSION.json index f821bf0df..a8afd4d6e 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1 +1 @@ -{"major":2, "minor":3, "hotfix":146} \ No newline at end of file +{"major":2, "minor":3, "hotfix":147} \ No newline at end of file diff --git a/app/Model/User.php b/app/Model/User.php index 341c0cbd4..f27ed4e1c 100755 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -383,9 +383,9 @@ class User extends AppModel { )); foreach ($users as $k => $user) { $gpg = new Crypt_GPG(array('homedir' => Configure::read('GnuPG.homedir'), 'binary' => (Configure::read('GnuPG.binary') ? Configure::read('GnuPG.binary') : '/usr/bin/gpg'))); - $key = $gpg->importKey($user['User']['gpgkey']); - $gpg->addEncryptKey($key['fingerprint']); // use the key that was given in the import try { + $key = $gpg->importKey($user['User']['gpgkey']); + $gpg->addEncryptKey($key['fingerprint']); // use the key that was given in the import $enc = $gpg->encrypt('test', true); } catch (Exception $e){ $results[$user['User']['id']][0] = true;