diff --git a/lib/SetupCheck/HighPerformanceBackend.php b/lib/SetupCheck/HighPerformanceBackend.php index d543ce76d8..fd2cd1b0e2 100644 --- a/lib/SetupCheck/HighPerformanceBackend.php +++ b/lib/SetupCheck/HighPerformanceBackend.php @@ -17,6 +17,7 @@ use OCP\IURLGenerator; use OCP\SetupCheck\ISetupCheck; use OCP\SetupCheck\SetupResult; use OCP\Support\Subscription\IRegistry; +use Psr\Log\LoggerInterface; class HighPerformanceBackend implements ISetupCheck { public function __construct( @@ -26,6 +27,7 @@ class HighPerformanceBackend implements ISetupCheck { protected readonly IL10N $l, protected readonly Manager $signalManager, protected readonly IRegistry $subscription, + protected readonly LoggerInterface $logger, ) { } @@ -78,10 +80,11 @@ class HighPerformanceBackend implements ISetupCheck { $publicKey = $this->talkConfig->getSignalingTokenPublicKey(); $publicKeyDerived = $this->talkConfig->deriveSignalingTokenPublicKey($privateKey, $alg); - if ($publicKey != $publicKeyDerived) { + if ($publicKey !== $publicKeyDerived) { return SetupResult::error($this->l->t('The stored public key for used algorithm %1$s does not match the stored private key. Run %2$s to fix the issue.', [$alg, '`occ talk:signaling:verify-keys --update`'])); } - } catch (\Exception) { + } catch (\Exception $e) { + $this->logger->error('An error occurred while verifying the public key of the signaling token', ['exception' => $e]); return SetupResult::error($this->l->t('High-performance backend not configured correctly. Run %s for details.', ['`occ talk:signaling:verify-keys`'])); }