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
F19108060: D21103.id50264.diff
Dec 8 2025, 4:19 PM
F19083257: D21103.id50264.diff
Dec 2 2025, 12:32 PM
F19076558: D21103.id50264.diff
Dec 1 2025, 12:24 PM
F19030459: D21103.id.diff
Nov 24 2025, 9:01 PM
F19020784: D21103.diff
Nov 23 2025, 6:17 PM
F18985413: D21103.id50262.diff
Nov 17 2025, 1:01 PM
F18830408: D21103.id50262.diff
Oct 25 2025, 6:41 AM
F18825151: D21103.id.diff
Oct 23 2025, 7:53 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