From 6b0c18d4dbdaf5278a51190549db86b143acc4cd Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 9 Apr 2020 16:10:41 +0200 Subject: [PATCH] JSONSchema: extend pve-configid regex by '-' we use this format for all 'delete' options but we have some options that have a '-' in the name (e.g. 'sync-defaults-options') that cannot be deleted if it is not included Signed-off-by: Dominik Csapak --- src/PVE/JSONSchema.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 01a3cce..1d28f36 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -169,7 +169,7 @@ register_format('pve-configid', \&pve_verify_configid); sub pve_verify_configid { my ($id, $noerr) = @_; - if ($id !~ m/^[a-z][a-z0-9_]+$/i) { + if ($id !~ m/^[a-z][a-z0-9_-]+$/i) { return undef if $noerr; die "invalid configuration ID '$id'\n"; } -- 2.39.2