diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 719fb748e8..f69cf7c097 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1642,7 +1642,6 @@ phutil_register_library_map(array( 'PhabricatorRepositoryController' => 'applications/repository/controller/PhabricatorRepositoryController.php', 'PhabricatorRepositoryDAO' => 'applications/repository/storage/PhabricatorRepositoryDAO.php', 'PhabricatorRepositoryDiscoveryEngine' => 'applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php', - 'PhabricatorRepositoryEditController' => 'applications/repository/controller/PhabricatorRepositoryEditController.php', 'PhabricatorRepositoryEditor' => 'applications/repository/editor/PhabricatorRepositoryEditor.php', 'PhabricatorRepositoryEngine' => 'applications/repository/engine/PhabricatorRepositoryEngine.php', 'PhabricatorRepositoryGitCommitChangeParserWorker' => 'applications/repository/worker/commitchangeparser/PhabricatorRepositoryGitCommitChangeParserWorker.php', @@ -3981,7 +3980,6 @@ phutil_register_library_map(array( 'PhabricatorRepositoryController' => 'PhabricatorController', 'PhabricatorRepositoryDAO' => 'PhabricatorLiskDAO', 'PhabricatorRepositoryDiscoveryEngine' => 'PhabricatorRepositoryEngine', - 'PhabricatorRepositoryEditController' => 'PhabricatorRepositoryController', 'PhabricatorRepositoryEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorRepositoryGitCommitChangeParserWorker' => 'PhabricatorRepositoryCommitChangeParserWorker', 'PhabricatorRepositoryGitCommitMessageParserWorker' => 'PhabricatorRepositoryCommitMessageParserWorker', diff --git a/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php b/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php index f03926f033..154a7f17c4 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php @@ -457,6 +457,21 @@ final class DiffusionRepositoryCreateController } } + // 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':