HomePhorge

Prevent Files from requiring infinite policy checks

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

Provenance
epriestleyAuthored on May 7 2015, 3:58 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPa238f6a7598a: Implement rough content-aware inline adjustment rules for ghosts
Branches
Unknown
Tags
Unknown

Event Timeline