more on the DM leakage bug

This commit is contained in:
zotlabs 2018-11-07 18:50:41 -08:00
parent fc63913421
commit 59a47e2835

View file

@ -109,10 +109,17 @@ function collect_recipients($item, &$private_envelope,$include_groups = true) {
}
}
$r = ThreadListener::fetch_by_target($item['parent_mid']);
if($r) {
foreach($r as $rv) {
$recipients[] = $rv['portable_id'];
// Forward to thread listeners, *unless* there is even a remote hint that the item
// might have some privacy attached. This could be (for instance) an ActivityPub DM
// in the mioddle fo a public thread. Unless we can guarantee beyond all doubt that
// this is public, don't allow it to go to thread listeners.
if(! intval($item['item_private'])) {
$r = ThreadListener::fetch_by_target($item['parent_mid']);
if($r) {
foreach($r as $rv) {
$recipients[] = $rv['portable_id'];
}
}
}