1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-31 08:58:20 +01:00

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:
epriestley 2015-06-30 11:42:31 -07:00
parent a8f5e10b79
commit 1bb306348c

View file

@ -37,6 +37,12 @@ final class PhabricatorHandleQuery
->requireCapabilities($this->getRequiredObjectCapabilities())
->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();
$filtered = $object_query->getPolicyFilteredPHIDs();