diff options
author | Mario <mario@mariovavti.com> | 2024-10-09 15:41:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-10-09 15:41:40 +0000 |
commit | 44232677c85249b5ae7e83aa0e040586acf2c7cc (patch) | |
tree | 9699684e9cdab8ea459d1e1369ab42ce06fbbd52 /Zotlabs/Lib/Libzot.php | |
parent | 16603ca85468162e117e71db53654de0d25611c8 (diff) | |
download | volse-hubzilla-44232677c85249b5ae7e83aa0e040586acf2c7cc.tar.gz volse-hubzilla-44232677c85249b5ae7e83aa0e040586acf2c7cc.tar.bz2 volse-hubzilla-44232677c85249b5ae7e83aa0e040586acf2c7cc.zip |
also dismiss add/remove collection activities in fetch_conversation()
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index a3431f420..05134f433 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1157,7 +1157,6 @@ class Libzot { logger('unsupported collection operation', LOGGER_DEBUG); return; - } if (is_array($AS->obj)) { @@ -2019,7 +2018,13 @@ class Libzot { foreach ($items as $activity) { $AS = new ActivityStreams($activity); - if ($AS->is_valid() && $AS->type === 'Announce' && is_array($AS->obj) + + if (!$AS->is_valid()) { + logger('Fetched activity rejected: ' . print_r($activity, true)); + continue; + } + + if ($AS->type === 'Announce' && is_array($AS->obj) && array_key_exists('object', $AS->obj) && array_key_exists('actor', $AS->obj)) { // This is a relayed/forwarded Activity (as opposed to a shared/boosted object) // Reparse the encapsulated Activity and use that instead @@ -2027,9 +2032,14 @@ class Libzot { $AS = new ActivityStreams($AS->obj); } - if (!$AS->is_valid()) { - logger('Fetched activity rejected: ' . print_r($activity, true)); - continue; + if (in_array($AS->type, ['Add', 'Remove']) + && is_array($AS->obj) + && array_key_exists('object', $AS->obj) + && array_key_exists('actor', $AS->obj) + && !empty($AS->tgt)) { + + logger('unsupported collection operation', LOGGER_DEBUG); + return; } // logger($AS->debug()); |