diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2023-03-15 15:24:06 -0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-15 15:24:06 -0100 |
commit | 3fc14ced4f6c04b6720dfbb25ebb0788c9dc1b0f (patch) | |
tree | c0a2b77b7bcd242f6f21a3b186238d6956f54c29 /lib | |
parent | 804ddccb654bb827180e89ef67472496be9e8d55 (diff) | |
parent | 044c738989af1322cbdaf46d8f62ece170c1a37b (diff) |
Merge pull request #1658 from nextcloud/fix/noid/stop-spam-log
catch missing actor
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/CacheActorService.php | 2 | ||||
-rw-r--r-- | lib/WellKnown/WebfingerHandler.php | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/Service/CacheActorService.php b/lib/Service/CacheActorService.php index 35314163..b8635f97 100644 --- a/lib/Service/CacheActorService.php +++ b/lib/Service/CacheActorService.php @@ -34,6 +34,7 @@ use Exception; use OCA\Social\AP; use OCA\Social\Db\ActorsRequest; use OCA\Social\Db\CacheActorsRequest; +use OCA\Social\Exceptions\ActorDoesNotExistException; use OCA\Social\Exceptions\CacheActorDoesNotExistException; use OCA\Social\Exceptions\InvalidOriginException; use OCA\Social\Exceptions\InvalidResourceException; @@ -177,6 +178,7 @@ class CacheActorService { * @return Person * @throws CacheActorDoesNotExistException * @throws SocialAppConfigException + * @throws ActorDoesNotExistException */ public function getFromLocalAccount(string $account): Person { $instance = ''; diff --git a/lib/WellKnown/WebfingerHandler.php b/lib/WellKnown/WebfingerHandler.php index ec4a1004..a6a11ed7 100644 --- a/lib/WellKnown/WebfingerHandler.php +++ b/lib/WellKnown/WebfingerHandler.php @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\Social\WellKnown; use OCA\Social\Db\CacheActorsRequest; +use OCA\Social\Exceptions\ActorDoesNotExistException; use OCA\Social\Exceptions\CacheActorDoesNotExistException; use OCA\Social\Exceptions\SocialAppConfigException; use OCA\Social\Exceptions\UnauthorizedFediverseException; @@ -109,7 +110,7 @@ class WebfingerHandler implements IHandler { $actor = null; try { $actor = $this->cacheActorService->getFromLocalAccount($subject); - } catch (SocialAppConfigException $e) { + } catch (ActorDoesNotExistException | SocialAppConfigException $e) { return null; } catch (CacheActorDoesNotExistException $e) { } |