1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Reject objects with invalid policies instead of fataling

Summary: This is correct, but the root cause of the issue isn't very clear to me.

Test Plan: Poked around various pages which filter objects.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11727
This commit is contained in:
epriestley 2015-02-10 06:16:42 -08:00
parent aaf8d73ec7
commit 767397ee14

View file

@ -411,7 +411,11 @@ final class PhabricatorPolicyFilter {
$viewer = $this->viewer;
$viewer_phid = $viewer->getPHID();
$policy = $this->customPolicies[$viewer_phid][$policy_phid];
$policy = idx($this->customPolicies[$viewer_phid], $policy_phid);
if (!$policy) {
// Reject, this policy is bogus.
return false;
}
$objects = $policy->getRuleObjects();
$action = null;