Page MenuHomePhabricator

Add back file URIs for Repository Remote URI
Closed, WontfixPublic

Description

At some point, the Repository Remote URI step of Diffusion's Import Repository wizard whitelisted out file URIs. Seeing as we currently have repositories hosted in this fashion, being suddenly unable to add more makes us sad :(

I assume the whitelist just needs another entry. Screenshot attached!

{F185465}

Event Timeline

kofalt raised the priority of this task from to Needs Triage.
kofalt updated the task description. (Show Details)
kofalt added a project: Diffusion.
kofalt added a subscriber: kofalt.
epriestley claimed this task.

They create security problems which can't be easily resolved. We do not plan to restore support for file://.

Curses. Could you elaborate a bit? We're running phabricator in a container that has read-only access to a gitolite hosting folder. I'd be open to changing how we handle our hosting (probably arrange for the container to have network access to gitolite, which it doesn't currently), but I'm curious what the security flaw entails.

A user who has permission to create repositories can read any repository on the machine by creating a new Phabricator repository with the file:// URI of a repository they do not have permission to see, violating application permissions.

In many cases this doesn't matter, but repositories are normally network services anyway and it's dramatically simpler to just drop support than add some kind of "enable file URIs, subtly eroding application policy enforcement" flag. Beyond being complex on its own, supporting this flag would make things like T4209 / T4292 more complex to implement in the future.

Fair enough; I appreciate the context.

Sorry for the inconvenience -- this is definitely a hassle to fix if you were relying on file:// and your environment doesn't have an easy way to switch to network protocols. Before we added policies this wasn't a concern, but now that we have them we've had to lock down a lot of filesystem stuff to make sure they actually work. Most of it has little or no effect, but this one does have an impact.