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
F14895128: D21103.id50264.diff
Sun, Feb 9, 8:56 AM
F14895127: D21103.id50262.diff
Sun, Feb 9, 8:56 AM
F14895126: D21103.id.diff
Sun, Feb 9, 8:56 AM
F14895125: D21103.diff
Sun, Feb 9, 8:56 AM
Unknown Object (File)
Sat, Jan 25, 7:02 AM
Unknown Object (File)
Sat, Jan 25, 7:02 AM
Unknown Object (File)
Sat, Jan 25, 7:02 AM
Unknown Object (File)
Sat, Jan 25, 7:02 AM
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
Branch
uri2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24080
Build 33152: Run Core Tests
Build 33151: arc lint + arc unit