Fix infinite loop in renderAccessDenied()
Summary: Fixes T8727. When I added `setParentQuery()`, I increased the cache hit rate but also accidentally propagated policy exception settings. Instead, make the policy exception beahvior explicit: no exceptions should be raised when querying handles. Test Plan: Will test production. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8727 Differential Revision: https://secure.phabricator.com/D13489
This commit is contained in:
@@ -37,6 +37,12 @@ final class PhabricatorHandleQuery
|
|||||||
->requireCapabilities($this->getRequiredObjectCapabilities())
|
->requireCapabilities($this->getRequiredObjectCapabilities())
|
||||||
->setViewer($this->getViewer());
|
->setViewer($this->getViewer());
|
||||||
|
|
||||||
|
// We never want the subquery to raise policy exceptions, even if this
|
||||||
|
// query is being executed via executeOne(). Policy exceptions are not
|
||||||
|
// meaningful or relevant for handles, which load in an "Unknown" or
|
||||||
|
// "Restricted" state after encountering a policy violation.
|
||||||
|
$object_query->setRaisePolicyExceptions(false);
|
||||||
|
|
||||||
$objects = $object_query->execute();
|
$objects = $object_query->execute();
|
||||||
$filtered = $object_query->getPolicyFilteredPHIDs();
|
$filtered = $object_query->getPolicyFilteredPHIDs();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user