Page MenuHomePhabricator

Prevent Files from requiring infinite policy checks
ClosedPublic

Authored by epriestley on May 7 2015, 7:04 PM.
Tags
None
Referenced Files
F13144562: D12756.diff
Fri, May 3, 8:17 AM
Unknown Object (File)
Thu, Apr 25, 2:15 AM
Unknown Object (File)
Mon, Apr 22, 9:47 PM
Unknown Object (File)
Tue, Apr 9, 6:47 PM
Unknown Object (File)
Wed, Apr 3, 4:33 PM
Unknown Object (File)
Apr 1 2024, 6:52 AM
Unknown Object (File)
Mar 19 2024, 2:52 PM
Unknown Object (File)
Mar 17 2024, 6:30 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
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.