Watch
0
0
Fork
You've already forked hyperhive
0

swarm: refuse swarm.hives keys that are not valid hive identifiers

A hive key becomes a certificate subject and a directory name, but only the
reserved-name and fragment guards looked at it, so `a/b` or `../x` evaluated
and misbehaved later. Assert at eval time that every key is 1-63 characters
of [a-z0-9-], the rule `Ident` applies in hive-types, and name the offending
keys in the message.
This commit is contained in:
atlas 2026-10-12 20:07:55 +02:00 • committed by mara
commit 7ee6e776a3
3 changed files with 91 additions and 1 deletions

View file

@ -369,6 +369,10 @@ in
designed for it.
'';
}
(nameGuards.mustBeIdent {
option = "services.hyperhive.swarm.hives";
names = hiveNames;
})
(nameGuards.mustNotEqual {
option = "services.hyperhive.swarm.hives";
names = hiveNames;