From 8d045889788f8dcd15c68c3a05d3a3fa01465da1 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Tue, 26 Nov 2024 14:31:48 +0100 Subject: [PATCH] RedundancygroupController: Restrict customVar suggestions - Only use fetchable relations. - Restrict to `host`, `service`, `hostgroup` and `servicegroup` --- application/controllers/RedundancygroupController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/RedundancygroupController.php b/application/controllers/RedundancygroupController.php index 9e0c65fb0..3c43ac856 100644 --- a/application/controllers/RedundancygroupController.php +++ b/application/controllers/RedundancygroupController.php @@ -228,6 +228,7 @@ public function completeAction(): void $suggestions = (new ObjectSuggestions()) ->setModel(DependencyNode::class) ->setBaseFilter(Filter::equal("$column.redundancy_group.id", $this->groupId)) + ->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup']) ->forRequest($this->getServerRequest()); $this->getDocument()->add($suggestions);