Page MenuHomePhabricator

Prevent Files from requiring infinite policy checks
ClosedPublic

Authored by epriestley on May 7 2015, 7:04 PM.
Tags
None
Referenced Files
F14016997: D12756.id30659.diff
Mon, Nov 4, 1:03 PM
F14016996: D12756.id30659.diff
Mon, Nov 4, 1:03 PM
F13985456: D12756.id.diff
Sun, Oct 20, 8:38 PM
F13979014: D12756.diff
Oct 19 2024, 2:05 AM
F13972828: D12756.id30674.diff
Oct 17 2024, 9:27 PM
F13966184: D12756.diff
Oct 16 2024, 6:50 AM
Unknown Object (File)
Oct 13 2024, 3:59 PM
Unknown Object (File)
Sep 27 2024, 11:15 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.