Differential D25144 Diff 591 src/applications/search/controller/PhabricatorApplicationSearchController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/controller/PhabricatorApplicationSearchController.php
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | private function processSearchRequest() { | ||||
} | } | ||||
$named_query = null; | $named_query = null; | ||||
$run_query = true; | $run_query = true; | ||||
$query_key = $this->queryKey; | $query_key = $this->queryKey; | ||||
if ($this->queryKey == 'advanced') { | if ($this->queryKey == 'advanced') { | ||||
$run_query = false; | $run_query = false; | ||||
$query_key = $request->getStr('query'); | $query_key = $request->getStr('query'); | ||||
} else if (!strlen($this->queryKey)) { | } else if (!phutil_nonempty_string($this->queryKey)) { | ||||
valerio.bozzolan: ✅ I logged `$this->queryKey` locally with `phlog()` in various page and I can confirm we can… | |||||
$found_query_data = false; | $found_query_data = false; | ||||
if ($request->isHTTPGet() || $request->isQuicksand()) { | if ($request->isHTTPGet() || $request->isQuicksand()) { | ||||
// If this is a GET request and it has some query data, don't | // If this is a GET request and it has some query data, don't | ||||
// do anything unless it's only before= or after=. We'll build and | // do anything unless it's only before= or after=. We'll build and | ||||
// execute a query from it below. This allows external tools to build | // execute a query from it below. This allows external tools to build | ||||
// URIs like "/query/?users=a,b". | // URIs like "/query/?users=a,b". | ||||
$pt_data = $request->getPassthroughRequestData(); | $pt_data = $request->getPassthroughRequestData(); | ||||
▲ Show 20 Lines • Show All 975 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I logged $this->queryKey locally with phlog() in various page and I can confirm we can assume it as string or null. It assumes string values like "authored", "all", "launcher", "advanced", "gPjpA9kNnigI" etc.
The phutil_nonempty_string() will report alien values and this is OK.