fix: [event view] make having a valid PGP setup optional for viewing events

- don't throw an exception, rather set an empty key
pull/8277/head v2.4.156
iglocska 2022-03-18 13:54:31 +01:00
parent ab1305cc18
commit 205ddb0b5a
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 6 additions and 1 deletions

View File

@ -1655,7 +1655,12 @@ class EventsController extends AppController
$this->set('warnings', $this->Event->generateWarnings($event));
$this->set('menuData', array('menuList' => 'event', 'menuItem' => 'viewEvent'));
$this->set('mayModify', $this->__canModifyEvent($event));
$this->set('instanceFingerprint', $this->Event->CryptographicKey->ingestInstanceKey());
try {
$instanceKey = $this->Event->CryptographicKey->ingestInstanceKey();
} catch (Exception $e) {
$instanceKey = null;
}
$this->set('instanceFingerprint', $instanceKey);
$this->__eventViewCommon($user);
}