phacility/phabricator · error · Exception
String " " is invalid in path specification " ".
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.
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.
Understand the failure class
Background: Path traversal blocked: "path escapes the workspace" and "outside site root" errors when a path will not stay inside its allowed directory — this error's family across 26 libraries.
Related errors
- Associated hook (" ") for webhook request (" ") has invalid…
- Client closed connection before receiving response.
- Client closed connection before sending a complete protocol…
- Client transmitted more than 1MB of data without…
- Expected ` `!
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/8c7485618d813db7.
Report an issue: GitHub.
Appendix: 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)