Page MenuHomePhabricator

Fix an issue where raw diffs that are not attached to revisions could skip repository policy checks
ClosedPublic

Authored by epriestley on Apr 13 2020, 7:05 PM.
Tags
None
Referenced Files
F15464570: D21103.id50264.diff
Wed, Apr 2, 10:49 AM
F15461392: D21103.id50262.diff
Tue, Apr 1, 7:59 AM
F15460300: D21103.id.diff
Mon, Mar 31, 9:43 PM
F15457899: D21103.diff
Sun, Mar 30, 7:57 PM
F15438968: D21103.id.diff
Wed, Mar 26, 5:01 AM
F15415925: D21103.id50262.diff
Thu, Mar 20, 8:28 AM
F15404874: D21103.diff
Tue, Mar 18, 9:28 AM
F15378618: D21103.diff
Thu, Mar 13, 3:45 PM
Subscribers
None

Details

Summary

See PHI1697. If a diff is not attached to a revision (for example, if it was created with "arc diff --only"), but is attached to a repository, it is supposed to be visible only to users who can see that repository.

It currently skips this extended policy check and may incorrectly be visible to too many users.

(Once a diff is attached to a revision, this rule is enforced properly via the revision policy.)

Test Plan
  • Set repository R to be visible only to Alice.
  • As Alice, created a diff from a working copy of repository R with "arc diff --only".
  • As Bailey, viewed the diff.
    • Before: visible diff.
    • After: policy exception (as expected).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable