From 5a37cfd4c000a3bce6e2ace293a2f273527ac8e9 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 23 Sep 2021 15:47:32 +0200 Subject: [PATCH] upid: remove arbitrary 128 max length for UPID we can easily go beyond that when having long datastore/remote names also because we do 'systemd-encode' them, which means that every special char takes up 4 bytes (e.g. '-' => '\x2d') while we could just increase the lenght to say 256 or 512, i do not really see the benefit to limit this at all, since users cannot create tasks with arbitrary names, and all other fields are generated from other valid types (username, datastore, remote, etc.) Signed-off-by: Dominik Csapak --- proxmox/src/api/upid.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/proxmox/src/api/upid.rs b/proxmox/src/api/upid.rs index fd3e9c94..8f03a204 100644 --- a/proxmox/src/api/upid.rs +++ b/proxmox/src/api/upid.rs @@ -54,7 +54,6 @@ pub const PROXMOX_UPID_FORMAT: ApiStringFormat = pub const UPID_SCHEMA: Schema = StringSchema::new("Unique Process/Task Identifier") .min_length("UPID:N:12345678:12345678:12345678:::".len()) - .max_length(128) // arbitrary .format(&PROXMOX_UPID_FORMAT) .schema();