Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14095081
D16172.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
901 B
Referenced Files
None
Subscribers
None
D16172.diff
View Options
diff --git a/scripts/ssh/ssh-connect.php b/scripts/ssh/ssh-connect.php
--- a/scripts/ssh/ssh-connect.php
+++ b/scripts/ssh/ssh-connect.php
@@ -88,7 +88,22 @@
$arguments[] = AlmanacKeys::getKeyPath('device.key');
}
+// Subversion passes us a host in the form "domain.com:port", which is not
+// valid for normal SSH but which we can parse into a valid "-p" flag.
+
+$passthru_args = $unconsumed_argv;
+$host = array_shift($passthru_args);
+$parts = explode(':', $host, 2);
+$host = $parts[0];
+
$port = $args->getArg('port');
+
+if (!$port) {
+ if (count($parts) == 2) {
+ $port = $parts[1];
+ }
+}
+
if ($port) {
$pattern[] = '-p %d';
$arguments[] = $port;
@@ -96,7 +111,9 @@
$pattern[] = '--';
-$passthru_args = $unconsumed_argv;
+$pattern[] = '%s';
+$arguments[] = $host;
+
foreach ($passthru_args as $passthru_arg) {
$pattern[] = '%s';
$arguments[] = $passthru_arg;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 7:38 PM (22 h, 8 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6790634
Default Alt Text
D16172.diff (901 B)
Attached To
Mode
D16172: Handle Subversion SSH on nonstandard ports
Attached
Detach File
Event Timeline
Log In to Comment