Page MenuHomePhabricator

Prevent Files from requiring infinite policy checks
ClosedPublic

Authored by epriestley on May 7 2015, 7:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 12:20 PM
Unknown Object (File)
Thu, Nov 28, 12:45 AM
Unknown Object (File)
Nov 19 2024, 9:01 AM
Unknown Object (File)
Nov 4 2024, 1:03 PM
Unknown Object (File)
Nov 4 2024, 1:03 PM
Unknown Object (File)
Oct 20 2024, 8:38 PM
Unknown Object (File)
Oct 19 2024, 2:05 AM
Unknown Object (File)
Oct 17 2024, 9:27 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.