fix(policy/expressions): do not Contains missing keys

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-04-27 22:49:44 -04:00
parent 029c79ba28
commit 4e1db3842e
4 changed files with 110 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ func (u URLValues) Find(key ref.Val) (ref.Val, bool) {
return nil, false
}
if _, ok := u.Values[string(k)]; !ok {
return nil, false
}
return types.String(strings.Join(u.Values[string(k)], ",")), true
}