1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 19:52:44 +01:00
phorge-phorge/src/infrastructure/query
epriestley 7556a70280 Prevent Files from requiring infinite policy checks
Summary:
Fixes T6726. Currently, a file may be attached to itself (or to other files, ultimately forming a loop). In this case, we currently run around the loop forever trying to load all the files.

Instead, decline to load objects if we're inside a query which is already loading them. This produces the right policy result //and// completes in finite time.

Test Plan:
  - Looped two files by writing `{F123}` and `{F124}` on the other files, respectively.
  - Loaded `F123`.
  - Saw long hang; used `debug.time-limit` to see huge stack trace instead.
  - Wrote patch.
  - `F123` now loads correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6726

Differential Revision: https://secure.phabricator.com/D12756
2015-05-07 15:58:35 -07:00
..
constraint Add "Edge Logic" support to PolicyAwareQuery 2015-04-20 10:06:12 -07:00
order Modernize Phriction ordering/paging 2015-04-13 11:58:25 -07:00
policy Prevent Files from requiring infinite policy checks 2015-05-07 15:58:35 -07:00
PhabricatorEmptyQueryException.php Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
PhabricatorOffsetPagedQuery.php Delete license headers from files 2012-11-05 11:16:51 -08:00
PhabricatorQuery.php Provide more buildXClause() and buildXClauseParts() on PolicyAwareQuery 2015-04-20 10:06:10 -07:00