Page MenuHomePhabricator

Remove "feed.public" and sort out feed policies
ClosedPublic

Authored by epriestley on Jul 1 2015, 9:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 1:37 AM
Unknown Object (File)
Tue, Apr 16, 10:24 AM
Unknown Object (File)
Thu, Apr 11, 9:20 AM
Unknown Object (File)
Thu, Apr 11, 5:41 AM
Unknown Object (File)
Sun, Apr 7, 1:44 AM
Unknown Object (File)
Sat, Apr 6, 2:28 AM
Unknown Object (File)
Tue, Apr 2, 6:23 PM
Unknown Object (File)
Tue, Apr 2, 5:17 PM
Subscribers

Details

Summary

Ref T6817. Fixes T8731. On the old secure host, feed.public was set to true. I didn't bring the option over, which caused the secondary issue in T8731.

Specifically, when feed.public is off, a logged-out user looking at feed can't see any stories, so they query all of feed until they hit the time limit.

To fix this immediately, just use the most open policy, which is basically equivalent but always correct.

To fix this more thoroughly:

  • Remove feed.public, which violates policies and has been slated for removal for a while (see T6817).
  • Clean up policy handling.
Test Plan
  • As a logged-out user, viewed feed on a public install with feed.public off; no longer saw all stories get queried + no feed shown.
  • Grepped for feed.public.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Remove "feed.public" and sort out feed policies.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
src/applications/feed/story/PhabricatorFeedStory.php
364

This should fix or at least improve T6817, although I didn't actually check what happens with it.

504

This method was buggy and never worked -- this should have been isset().

src/applications/feed/story/PhabricatorFeedStory.php
91–97

Specifically, this is performing the effective policy check: you need to be able to see a story's object(s) in order to see the story.

Oh, and "public feed" (e.g., feed on this install) still works fine, just not the special secret magical iframe policy-violating feed.

This revision is now accepted and ready to land.Jul 1 2015, 10:04 PM
This revision was automatically updated to reflect the committed changes.