Homec4science

Prevent Files from requiring infinite policy checks

Authored by epriestley <git@epriestley.com> on May 8 2015, 00:58.

Description

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

Details

Committed
epriestley <git@epriestley.com>May 8 2015, 00:58
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa238f6a7598a: Implement rough content-aware inline adjustment rules for ghosts
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH7556a70280c8: Prevent Files from requiring infinite policy checks (authored by epriestley <git@epriestley.com>).May 8 2015, 00:58