From d821afb418b0705353e6498fe5c4cc966a0fcba9 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 28 Sep 2022 16:32:17 +0000 Subject: [PATCH] Added logging of unexpected follow messages --- src/Protocol/ActivityPub/Receiver.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index 0cdbe82fc7..57f1089a36 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -852,7 +852,11 @@ class Receiver case 'as:Accept': if ($object_data['object_type'] == 'as:Follow') { - ActivityPub\Processor::acceptFollowUser($object_data); + if (!empty($object_data['object_actor'])) { + ActivityPub\Processor::acceptFollowUser($object_data); + } else { + Logger::debug('Unhandled "accept follow" message.', ['object_data' => $object_data]); + } } elseif (in_array($object_data['object_type'], self::CONTENT_TYPES)) { ActivityPub\Processor::createActivity($object_data, Activity::ATTEND); } else { -- 2.39.5