diff --git a/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php b/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php --- a/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php +++ b/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php @@ -10,7 +10,10 @@ public function newJumpURI($query) { // If you search for a URI on the local install, just redirect to that // URI as though you had pasted it into the URI bar. - if (PhabricatorEnv::isSelfURI($query)) { + // Skip things that are really not full URLs, like "asdasd". + // Note that the backend of "isSelfURI" is faster with a PhutilURI. + $uri = new PhutilURI($query); + if ($uri->getDomain() !== '' && PhabricatorEnv::isSelfURI($uri)) { // Strip off the absolute part of the URI. If we don't, the URI redirect // validator will get upset that we're performing an unmarked external // redirect. @@ -20,8 +23,7 @@ // we want to redirect to "https://" if an install is HTTPS, and // the "isSelfURI()" check includes alternate domains in addition to the // canonical domain. - - $uri = id(new PhutilURI($query)) + $uri = $uri ->setDomain(null) ->setProtocol(null) ->setPort(null);