[pbs-devel] [PATCH proxmox-backup] upid: remove arbitrary 128 max length for UPID

Dominik Csapak d.csapak at proxmox.com
Thu Sep 23 15:47:32 CEST 2021


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 <d.csapak at proxmox.com>
---
 pbs-api-types/src/upid.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pbs-api-types/src/upid.rs b/pbs-api-types/src/upid.rs
index ba23a646..3094be2d 100644
--- a/pbs-api-types/src/upid.rs
+++ b/pbs-api-types/src/upid.rs
@@ -58,7 +58,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();
 
-- 
2.30.2






More information about the pbs-devel mailing list