SortBox: Fix too strict sort param check

One was able to produce invalid SQL or other
errors by adding "sort=" as parameter.
This commit is contained in:
Johannes Meyer 2015-12-03 15:17:09 +01:00
parent 43848989ae
commit 3d60e60842
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class SortBox extends AbstractWidget
if ($request === null) { if ($request === null) {
$request = Icinga::app()->getRequest(); $request = Icinga::app()->getRequest();
} }
if (null === $sort = $request->getParam('sort')) { if (! ($sort = $request->getParam('sort'))) {
list($sort, $dir) = $this->getSortDefaults(); list($sort, $dir) = $this->getSortDefaults();
} else { } else {
list($_, $dir) = $this->getSortDefaults($sort); list($_, $dir) = $this->getSortDefaults($sort);