From 59126da74f2e4ea9b9e774fbd783209bd95692d3 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 5c409d8d..eed56589 100644 --- a/application/controllers/RedundancygroupController.php +++ b/application/controllers/RedundancygroupController.php @@ -230,6 +230,7 @@ class RedundancygroupController extends Controller $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);