Page MenuHomePhabricator

Prevent Files from requiring infinite policy checks
ClosedPublic

Authored by epriestley on May 7 2015, 7:04 PM.
Tags
None
Referenced Files
F15529228: D12756.id30674.diff
Tue, Apr 22, 6:00 PM
F15528845: D12756.id30659.diff
Tue, Apr 22, 2:24 PM
F15524120: D12756.id.diff
Mon, Apr 21, 6:05 AM
F15521290: D12756.diff
Sun, Apr 20, 12:52 PM
F15516874: D12756.id30674.diff
Fri, Apr 18, 9:58 PM
F15504511: D12756.diff
Mon, Apr 14, 6:31 PM
F15391979: D12756.id30674.diff
Mar 15 2025, 12:39 PM
F15378185: D12756.id30659.diff
Mar 13 2025, 1:23 PM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
inflight1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 5835
Build 5855: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Prevent Files from requiring infinite policy checks.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

whoops meant to accept earlier

This revision is now accepted and ready to land.May 7 2015, 9:51 PM
This revision was automatically updated to reflect the committed changes.