@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When proxying the SVN protocol, don't mutate URIs in protocol frames if we're an intracluster proxy

Summary:
Ref T10809. Currently, both the proxy and target may mutate URIs (rewriting "svn+ssh://x/diffusion/Y/" to a path on disk).

I believe this previously worked by fate/chance/luck since both URI variants contain the repository information, but the algorithms were tightened up recently with callsign removal.

Stop rewriting them if we're the intracluster proxy -- they only need to be rewritten on the target host.

Test Plan:
- Checked out a proxied SVN repository, with and without a callsign.
- Checked out an unproxied SVN repository, with and without a callsign.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10809

Differential Revision: https://secure.phabricator.com/D15712

+10
+10
src/applications/diffusion/ssh/DiffusionSubversionServeSSHWorkflow.php
··· 21 21 private $externalBaseURI; 22 22 private $peekBuffer; 23 23 private $command; 24 + private $isProxying; 24 25 25 26 private function getCommand() { 26 27 return $this->command; ··· 146 147 147 148 if ($this->shouldProxy()) { 148 149 $command = $this->getProxyCommand(); 150 + $this->isProxying = true; 149 151 } else { 150 152 $command = csprintf( 151 153 'svnserve -t --tunnel-user=%s', ··· 372 374 } 373 375 374 376 private function makeInternalURI($uri_string) { 377 + if ($this->isProxying) { 378 + return $uri_string; 379 + } 380 + 375 381 $uri = new PhutilURI($uri_string); 376 382 377 383 $repository = $this->getRepository(); ··· 409 415 } 410 416 411 417 private function makeExternalURI($uri) { 418 + if ($this->isProxying) { 419 + return $uri; 420 + } 421 + 412 422 $internal = $this->internalBaseURI; 413 423 $external = $this->externalBaseURI; 414 424