Page MenuHomePhabricator

D7431.id16725.diff
No OneTemporary

D7431.id16725.diff

Index: src/applications/diffusion/controller/DiffusionRepositoryCreateController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryCreateController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryCreateController.php
@@ -457,6 +457,21 @@
}
}
+ // Catch confusion between Git/SCP-style URIs and normal URIs. See T3619
+ // for discussion. This is usually a user adding "ssh://" to an implicit
+ // SSH Git URI.
+ if ($proto == 'ssh') {
+ if (preg_match('(^[^:@]+://[^/:]+:[^\d])', $v_remote)) {
+ $c_remote->setError(pht('Invalid'));
+ $page->addPageError(
+ pht(
+ "The Remote URI is not formatted correctly. Remote URIs ".
+ "with an explicit protocol should be in the form ".
+ "'proto://domain/path', not 'proto://domain:/path'. ".
+ "The ':/path' syntax is only valid in SCP-style URIs."));
+ }
+ }
+
switch ($proto) {
case 'ssh':
case 'http':

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 10, 5:07 PM (2 d, 5 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6764298
Default Alt Text
D7431.id16725.diff (1 KB)

Event Timeline