phacility/phabricator · error · Exception
String "%s" is invalid in path specification "%s".
Error message
String "%s" is invalid in path specification "%s".
What it means
Before normalizing the repository path, the workflow rejects any URI path containing '/../'. This is a path-traversal guard: SVN itself may cope with dot-dot segments, but Phabricator refuses them so a client cannot address anything outside the repository namespace while the URL path is mapped to a repository.
Source
Thrown at src/applications/diffusion/ssh/DiffusionSubversionServeSSHWorkflow.php:379
}
private function getPathFromSubversionURI($uri_string) {
$uri = new PhutilURI($uri_string);
$proto = $uri->getProtocol();
if ($proto !== 'svn+ssh') {
throw new Exception(
pht(
'Protocol for URI "%s" MUST be "%s".',
$uri_string,
'svn+ssh'));
}
$path = $uri->getPath();
// Subversion presumably deals with this, but make sure there's nothing
// sketchy going on with the URI.
if (preg_match('(/\\.\\./)', $path)) {
throw new Exception(
pht(
'String "%s" is invalid in path specification "%s".',
'/../',
$uri_string));
}
$path = $this->normalizeSVNPath($path);
return $path;
}
private function makeInternalURI($uri_string) {
if ($this->isProxying) {
return $uri_string;
}
$uri = new PhutilURI($uri_string);
View on GitHub (pinned to 5720a38cfe)
Solutions
- Clean the URL: reference the repository by its canonical path/callsign with no '..' segments
- Fix scripts that assemble checkout paths via relative joins
- Treat unexpected occurrences as probing of the instance and review access logs
Defensive patterns
Strategy: validation
Validate before calling
if (preg_match('(/\\.\\./)', $path)) {
throw new Exception('Reject ../ segments before mapping to a repository.');
} Prevention
- Canonicalize user-supplied VCS paths before they reach server workflows
- Never build checkout URLs by joining untrusted relative segments
When it happens
Trigger: A URL like svn+ssh://host/../../elsewhere crafted manually; client or tunnel rewriting that inserts relative segments; fuzzed input sent at the SSH endpoint.
Common situations: Security scanners probing the SSH service; scripts building checkout URLs by naive concatenation; users trying to reach a sibling repository with '..' segments.
Related errors
- When creating a new Almanac service via the Conduit API, you
- Provide a public key, not a private key!
- Invalid response token for this challenge: token digest does
- Request includes restricted parameter "%s", but this control
- Mercurial command appears to contain unsafe injected "--conf
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/8c7485618d813db7.
Report an issue: GitHub.