Page MenuHomePhabricator

D19226.diff
No OneTemporary

D19226.diff

diff --git a/src/applications/subscriptions/policyrule/PhabricatorSubscriptionsSubscribersPolicyRule.php b/src/applications/subscriptions/policyrule/PhabricatorSubscriptionsSubscribersPolicyRule.php
--- a/src/applications/subscriptions/policyrule/PhabricatorSubscriptionsSubscribersPolicyRule.php
+++ b/src/applications/subscriptions/policyrule/PhabricatorSubscriptionsSubscribersPolicyRule.php
@@ -45,10 +45,13 @@
$this->subscribed[$viewer_phid] = array();
}
- // Load the project PHIDs the user is a member of.
+ // Load the project PHIDs the user is a member of. We use the omnipotent
+ // user here because projects may themselves have "Subscribers" visibility
+ // policies and we don't want to get stuck in an infinite stack of
+ // recursive policy checks. See T13106.
if (!isset($this->sourcePHIDs[$viewer_phid])) {
$projects = id(new PhabricatorProjectQuery())
- ->setViewer($viewer)
+ ->setViewer(PhabricatorUser::getOmnipotentUser())
->withMemberPHIDs(array($viewer_phid))
->execute();

File Metadata

Mime Type
text/plain
Expires
Mon, May 13, 11:20 PM (4 w, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6293814
Default Alt Text
D19226.diff (1 KB)

Event Timeline