From a01cdccb05b2db46a43272a0bfd6c7bab8787118 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 30 Nov 2022 09:28:27 +0000 Subject: [PATCH] Check that an auto reshare is only done on the expected contact --- src/Model/Item.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Model/Item.php b/src/Model/Item.php index cb998c0fd..89925c532 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2271,6 +2271,11 @@ class Item return; } + $cdata = Contact::getPublicAndUserContactID($item['author-id'], $item['uid']); + if (empty($cdata['user']) || ($cdata['user'] != $item['contact-id'])) { + return; + } + if (!DBA::exists('contact', ['id' => $item['contact-id'], 'remote_self' => Contact::MIRROR_NATIVE_RESHARE])) { return; }