Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2685185
D25561.1734701513.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25561.1734701513.diff
View Options
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
@@ -8,9 +8,18 @@
}
public function newJumpURI($query) {
+
+ // Note that the backend of "isSelfURI" is faster with a PhutilURI.
+ $uri_query = new PhutilURI($query);
+
+ // Skip things that are really not full URLs, like "asdasd".
+ if ($uri_query->getDomain() === '') {
+ return null;
+ }
+
// 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)) {
+ if (PhabricatorEnv::isSelfURI($uri_query)) {
// 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 +29,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_query
->setDomain(null)
->setProtocol(null)
->setPort(null);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 13:31 (8 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1017447
Default Alt Text
D25561.1734701513.diff (1 KB)
Attached To
Mode
D25561: Fix important regression in search engine
Attached
Detach File
Event Timeline
Log In to Comment