Page MenuHomePhabricator

Can't browse or see history of any files with a '+' in the file path.
Closed, ResolvedPublic

Description

Unable browse or see the history of any files with a '+' in the file path (in SVN external repo). Other characters could result in the same issue, but I've only noticed it with at '+'.

Diffs display correctly when viewing a commit containing files with a '+' in the path, but under the "Changes" section when viewing a commit, the history for said files show as blank, and both "browse" and "modified" links result in "path does not exist" and 404 errors respectively.

Event Timeline

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

This is probably the webserver interpreting + as (that is, a space) before we get to see the request.

I think this is usually caused by using Apache with a rewrite rule like this:

RewriteRule ^(.*) /rewrite.php?__path__=$1 [L,QSA]

Instead, the rule should include B, like this:

RewriteRule ^(.*) /rewrite.php?__path__=$1 [B,L,QSA]

Is it possible that (or some similar rewrite configuration issue) is what's causing the problem? Which webserver are you using?

Perfect. Using Apache - that was precisely the problem. Thanks!

ericgriffin claimed this task.

Cool. We should try to detect this and warn you about it, but it's a bit tricky since we have to make a request to ourselves and then make sure that we can't cause an infinite loop no matter how misconfigured things are. There are some other tasks filed somewhere else that approximately cover this already, though. I'll make a note on T2226. Let us know if you run into anything else.