Page MenuHomePhabricator

Prevent Repository local path edit from the web UI
ClosedPublic

Authored by epriestley on Nov 13 2013, 5:33 PM.
Tags
None
Referenced Files
F15459861: D7580.id17104.diff
Mon, Mar 31, 5:30 PM
F15459860: D7580.id.diff
Mon, Mar 31, 5:30 PM
F15445943: D7580.diff
Thu, Mar 27, 4:40 PM
F15441020: D7580.id.diff
Wed, Mar 26, 4:05 PM
F15437748: D7580.diff
Tue, Mar 25, 9:16 PM
F15434881: D7580.id17110.diff
Tue, Mar 25, 5:49 AM
F15397817: D7580.id17104.diff
Sun, Mar 16, 10:26 PM
F15374283: D7580.diff
Mar 12 2025, 6:15 PM
Subscribers

Details

Summary

Ref T4039. This fixes an issue where a user with the ability to create repositories could view repositories he is otherwise not permitted to see, by following these steps:

  • Suppose you want to see repository "A".
  • Create a repository with the same VCS, called "B".
  • Edit the local path, changing "/var/repo/B" to "/var/repo/A".
  • Now it points at a working copy of a repository you can't see.
  • Although you won't be able to make it through discovery (the pull will fail with the wrong credentials), you can read some information out of the repository directly through the Diffusion UI, probably?

I'm not sure this was really practical to execute since there are a bunch of sanity checks along most/all of the major pathways, but lock it down since normal users shouldn't be editing it anyway. In the best case, this would make a mess.

Test Plan

{F81391}

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped