From 105842658e2837fc4b9c2a7dd5794615a71bbf39 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 19 May 2022 12:41:33 +0200 Subject: [PATCH] Auth: Explicitly select `flatname` from `customvar_flat` The `*` was just a lazy fix. Should be bullet proof now. (fingers crossed) --- library/Icingadb/Common/Auth.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Icingadb/Common/Auth.php b/library/Icingadb/Common/Auth.php index 6f4e2690..a7ab885e 100644 --- a/library/Icingadb/Common/Auth.php +++ b/library/Icingadb/Common/Auth.php @@ -203,7 +203,12 @@ trait Auth $columns = $query->getColumns(); if (empty($columns)) { - $columns = [$flatvaluePath, '*']; + $columns = [ + $customVarRelationName + ? $resolver->qualifyColumn('flatname', $customVarRelationName) + : 'flatname', + $flatvaluePath + ]; } $flatvalue = null;