From cd04709735db8f916cd4a57a796a26a645b053c1 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Fri, 23 Aug 2019 13:03:43 -0100 Subject: [PATCH] some fixes Signed-off-by: Maxence Lange --- lib/Service/PushService.php | 12 +++++++----- lib/Service/SignatureService.php | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/Service/PushService.php b/lib/Service/PushService.php index ec83cdb7..61b52f83 100644 --- a/lib/Service/PushService.php +++ b/lib/Service/PushService.php @@ -94,9 +94,6 @@ class PushService { /** * @param string $streamId - * - * @throws SocialAppConfigException - * @throws PushInstallException */ public function onNewStream(string $streamId) { // FIXME: remove in nc18 @@ -114,8 +111,13 @@ class PushService { return; } - $pushHelper = $this->pushManager->getPushHelper(); - $details = $this->detailsService->generateDetailsFromStream($stream); + try { + $pushHelper = $this->pushManager->getPushHelper(); + $details = $this->detailsService->generateDetailsFromStream($stream); + } catch (PushInstallException | SocialAppConfigException $e) { + return; + } + $home = array_map( function(Person $item): string { return $item->getUserId(); diff --git a/lib/Service/SignatureService.php b/lib/Service/SignatureService.php index d5cde685..dd035e09 100644 --- a/lib/Service/SignatureService.php +++ b/lib/Service/SignatureService.php @@ -396,12 +396,12 @@ class SignatureService { * @param string $publicKey * @param array $sign * @param string $estimated - * @param bool $signed + * @param string $signed * * @throws SignatureException */ private function checkRequestSignatureUsingPublicKey( - string $publicKey, array $sign, string $estimated, bool $signed + string $publicKey, array $sign, string $estimated, string $signed ) { $algorithm = $this->getAlgorithmFromSignature($sign); if ($publicKey === ''