From ee6d53a804e1c2a50c7a3700614c74a2a6788463 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 9 Jun 2021 13:53:22 +0200 Subject: [PATCH] stages/groups: fix group name schema validation Use `patternProperties` instead of `propertyNames` and `pattern`, which is not in draft 4 and so did not work (but also did not throw an error). --- stages/org.osbuild.groups | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/stages/org.osbuild.groups b/stages/org.osbuild.groups index 4ab511553..273c3a432 100755 --- a/stages/org.osbuild.groups +++ b/stages/org.osbuild.groups @@ -22,16 +22,16 @@ SCHEMA = """ "properties": { "groups": { "type": "object", + "additionalProperties": false, "description": "Keys are group names, values are objects with group info", - "propertyNames": { - "pattern": "^[A-Za-z0-9_][A-Za-z0-9_-]{0,31}$" - }, - "additionalProperties": { - "type": "object", - "properties": { - "gid": { - "type": "number", - "description": "GID for this group" + "patternProperties": { + "^[A-Za-z0-9_][A-Za-z0-9_-]{0,31}$": { + "type": "object", + "properties": { + "gid": { + "type": "number", + "description": "GID for this group" + } } } }