public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] upid: remove arbitrary 128 max length for UPID
@ 2021-09-23 13:47 Dominik Csapak
  2021-09-24  9:10 ` [pbs-devel] applied: " Dietmar Maurer
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-09-23 13:47 UTC (permalink / raw)
  To: pbs-devel

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@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] upid: remove arbitrary 128 max length for UPID
  2021-09-23 13:47 [pbs-devel] [PATCH proxmox-backup] upid: remove arbitrary 128 max length for UPID Dominik Csapak
@ 2021-09-24  9:10 ` Dietmar Maurer
  0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Maurer @ 2021-09-24  9:10 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

applied to proxmox crate (upid is now in proxmox crate)

On 9/23/21 3:47 PM, Dominik Csapak wrote:
> 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@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();
>   




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-24  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 13:47 [pbs-devel] [PATCH proxmox-backup] upid: remove arbitrary 128 max length for UPID Dominik Csapak
2021-09-24  9:10 ` [pbs-devel] applied: " Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal