Files
cozystack/pkg
Mattia Eleuteri a125b98cd7 fix(securitygroups): reject port ranges and malformed FQDNs on the SecurityGroup path
A port such as "80-90" fell through to the named-port check and was
refused because it "must contain at least one letter", which says
nothing about the actual limit: a SecurityGroup port carries one port,
and Cilium's endPort is not exposed.

FQDN selectors were only checked for being non-empty. A malformed
matchName or matchPattern passed validation and was then refused by the
CiliumNetworkPolicy CRD on the backing write, so the tenant got a schema
error about an object they never wrote. Apply the CRD's own rules
instead: its two patterns, its 255-character limit, and its oneOf
between matchName and matchPattern.

Fixes #5130

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
2026-11-13 10:39:40 +01:00
..