]> git.mxchange.org Git - friendica.git/commitdiff
Check that an auto reshare is only done on the expected contact
authorMichael <heluecht@pirati.ca>
Wed, 30 Nov 2022 09:28:27 +0000 (09:28 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 30 Nov 2022 09:28:27 +0000 (09:28 +0000)
src/Model/Item.php

index cb998c0fdcb4feac35219a8acf10aa78868baa60..89925c532b5eacd14a0ff7c5a77ae74efd2ff530 100644 (file)
@@ -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;
                }