1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/diffusion
epriestley d401036bd8 Prevent the use of file:// URIs in Diffusion
Summary:
Via HackerOne. There are two attacks here:

  - Configuring mirroring to a `file://` URI to place files on disk or overwrite another repository. This is not particularly severe.
  - Configuring cloning from a `file://` URI to read repositories you should not have access to. This is more severe.

Historically, repository creation and editing explicitly supported `file://` URIs to deal with use cases where you had something else managing repositories on the same machine. Since there were no permissions, repository management was admin-only, and you couldn't mirror, this was fine.

As we've evolved, this use case is a tiny minority use case and the security implications of `file://` URIs overwhelm the utility it provides. Prevent the use of `file://` URIs. Existing configured repositories won't stop working, you just can't add any new ones.

Also prevent `localPath` from being set via Conduit (see T4039).

Test Plan:
  - Tried to create a `file://` repository.
  - Tried to create a `file://` mirror.
  - Tried to create a `file://` repository via Conduit.
  - Created a non-`file://` repository.
  - Created a non-`file://` mirror.
  - Created a non-`file://` repository via Conduit.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9513
2014-06-13 07:07:00 -07:00
..
application (Redesign) Clean up older "Tile" code 2014-06-03 15:47:27 -07:00
capability Add global "push" policy to Repositories 2013-10-29 15:32:40 -07:00
conduit Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
config Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
controller Prevent the use of file:// URIs in Diffusion 2014-06-13 07:07:00 -07:00
data Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
doorkeeper fix query for doorkeeper 2014-04-29 15:12:04 -07:00
engine Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
events Various linter fixes. 2014-02-26 12:44:58 -08:00
exception Throw a more tailored exception after failing to resolve a ref 2014-05-13 13:52:33 -07:00
herald Allow users to receive email about pushes via Herald 2014-03-26 13:51:15 -07:00
panel Make many actions require high security 2014-04-30 17:44:59 -07:00
protocol Applied various linter fixes. 2014-06-09 16:04:12 -07:00
query Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
remarkup Add a Diffusion repository remarkup rule 2013-12-31 11:08:08 -08:00
request Applied various linter fixes. 2014-06-09 16:04:12 -07:00
response Allow Phabricator to serve Mercurial repositories over HTTP 2013-11-06 18:00:42 -08:00
ssh Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
view Applied various linter fixes. 2014-06-09 16:04:12 -07:00
DiffusionLintSaveRunner.php Provide a rough, unstable API for reporting coverage into Diffusion 2014-05-17 16:10:54 -07:00