@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When loading project membership to evaluate the "Subscribers" policy, use the ominipotent viewer

Summary: See PHI448. Ref T13106. The current implementation here can end up in an infinite stack if, e.g., a project uses "Visible to: Subscribers".

Test Plan: Will push.

Maniphest Tasks: T13106

Differential Revision: https://secure.phabricator.com/D19226

+5 -2
+5 -2
src/applications/subscriptions/policyrule/PhabricatorSubscriptionsSubscribersPolicyRule.php
··· 45 45 $this->subscribed[$viewer_phid] = array(); 46 46 } 47 47 48 - // Load the project PHIDs the user is a member of. 48 + // Load the project PHIDs the user is a member of. We use the omnipotent 49 + // user here because projects may themselves have "Subscribers" visibility 50 + // policies and we don't want to get stuck in an infinite stack of 51 + // recursive policy checks. See T13106. 49 52 if (!isset($this->sourcePHIDs[$viewer_phid])) { 50 53 $projects = id(new PhabricatorProjectQuery()) 51 - ->setViewer($viewer) 54 + ->setViewer(PhabricatorUser::getOmnipotentUser()) 52 55 ->withMemberPHIDs(array($viewer_phid)) 53 56 ->execute(); 54 57