[pve-devel] [PATCH v3 pve-common 38/66] JSONSchema: increase maxLength of config-digest to 64

Lukas Wagner l.wagner at proxmox.com
Mon Jul 17 17:00:23 CEST 2023


The new notification backend is implemented in Rust where we use SHA256
for config digests.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 src/PVE/JSONSchema.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
index 7589bba..49e0d7a 100644
--- a/src/PVE/JSONSchema.pm
+++ b/src/PVE/JSONSchema.pm
@@ -93,10 +93,13 @@ register_standard_option('pve-bridge-id', {
 });
 
 register_standard_option('pve-config-digest', {
-    description => 'Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.',
+    description => 'Prevent changes if current configuration file has a different digest. '
+	. 'This can be used to prevent concurrent modifications.',
     type => 'string',
     optional => 1,
-    maxLength => 40, # sha1 hex digest length is 40
+    # sha1 hex digests are 40 characters long
+    # sha256 hex digests are 64 characters long (sha256 is used in our Rust code)
+    maxLength => 64,
 });
 
 register_standard_option('skiplock', {
-- 
2.39.2






More information about the pve-devel mailing list