Page MenuHomePhabricator

Prevent Files from requiring infinite policy checks
ClosedPublic

Authored by epriestley on May 7 2015, 7:04 PM.
Tags
None
Referenced Files
F13214730: D12756.id30659.diff
Fri, May 17, 12:32 PM
F13205078: D12756.diff
Wed, May 15, 1:25 AM
F13199977: D12756.id30659.diff
Mon, May 13, 8:20 PM
F13199976: D12756.id30674.diff
Mon, May 13, 8:20 PM
F13199789: D12756.id.diff
Mon, May 13, 6:26 PM
F13199731: D12756.diff
Mon, May 13, 5:36 PM
F13188388: D12756.diff
Sat, May 11, 5:13 AM
Unknown Object (File)
Tue, May 7, 8:27 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
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.