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
F18746213: D21103.id50264.diff
Fri, Oct 3, 11:50 AM
F18734222: D21103.id.diff
Tue, Sep 30, 10:50 PM
F18642118: D21103.diff
Sep 18 2025, 10:36 PM
F18640163: D21103.id.diff
Sep 17 2025, 7:49 PM
F18623250: D21103.diff
Sep 15 2025, 2:59 PM
F18583587: D21103.diff
Sep 11 2025, 10:36 AM
F18583445: D21103.diff
Sep 11 2025, 10:29 AM
F18583373: D21103.diff
Sep 11 2025, 10:16 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable