@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.

Handle Subversion SSH on nonstandard ports

Summary:
Fixes T11203. Subversion handling of `SVN_SSH` commands requires some additional finesse for nonstandard remote SSH ports.

We get `domain.com:port` in the command, so parse it out if it's present.

Test Plan: @enckse confirmed this locally in T11203.

Reviewers: chad

Reviewed By: chad

Subscribers: enckse

Maniphest Tasks: T11203

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

+18 -1
+18 -1
scripts/ssh/ssh-connect.php
··· 88 88 $arguments[] = AlmanacKeys::getKeyPath('device.key'); 89 89 } 90 90 91 + // Subversion passes us a host in the form "domain.com:port", which is not 92 + // valid for normal SSH but which we can parse into a valid "-p" flag. 93 + 94 + $passthru_args = $unconsumed_argv; 95 + $host = array_shift($passthru_args); 96 + $parts = explode(':', $host, 2); 97 + $host = $parts[0]; 98 + 91 99 $port = $args->getArg('port'); 100 + 101 + if (!$port) { 102 + if (count($parts) == 2) { 103 + $port = $parts[1]; 104 + } 105 + } 106 + 92 107 if ($port) { 93 108 $pattern[] = '-p %d'; 94 109 $arguments[] = $port; ··· 96 111 97 112 $pattern[] = '--'; 98 113 99 - $passthru_args = $unconsumed_argv; 114 + $pattern[] = '%s'; 115 + $arguments[] = $host; 116 + 100 117 foreach ($passthru_args as $passthru_arg) { 101 118 $pattern[] = '%s'; 102 119 $arguments[] = $passthru_arg;