HostgroupController: Don't apply id filter using the FilterProcessor

Ids are binary strings which may contain asterisks. These are then
interpreted as wildcard by the filter processor.
This commit is contained in:
Johannes Meyer 2020-03-06 14:47:39 +01:00
parent 248ab1c704
commit 4e1bd775f9

View file

@ -43,13 +43,9 @@ class HostgroupController extends Controller
{
$db = $this->getDb();
$hosts = Host::on($db)->with('state');
FilterProcessor::apply(
new FilterExpression('hostgroup.id', '=', $this->hostgroup->id),
$hosts
);
$hosts = Host::on($db)->with('state')->utilize('hostgroup');
$hosts->getSelectBase()->where(['host_hostgroup.id = ?' => $this->hostgroup->id]);
$this->applyMonitoringRestriction($hosts);
$limitControl = $this->createLimitControl();