public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] upload_chunk: allow upload of empty blobs
@ 2020-07-27 11:22 Dominik Csapak
  2020-07-28  9:05 ` [pbs-devel] applied: " Dietmar Maurer
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-07-27 11:22 UTC (permalink / raw)
  To: pbs-devel

a blob can be empty (e.g. an empty pct fw conf), so we
have to set the minimum size to the header size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
fixes the problem some users had, e.g.
https://forum.proxmox.com/threads/ct-backup-error-parameter-encoded-size-value-must-have-a-minimum-value-of-13-got-12.73051/

 src/api2/backup/upload_chunk.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api2/backup/upload_chunk.rs b/src/api2/backup/upload_chunk.rs
index 483ced3..ec95472 100644
--- a/src/api2/backup/upload_chunk.rs
+++ b/src/api2/backup/upload_chunk.rs
@@ -243,7 +243,7 @@ pub const API_METHOD_UPLOAD_BLOB: ApiMethod = ApiMethod::new(
         &sorted!([
             ("file-name", false, &crate::api2::types::BACKUP_ARCHIVE_NAME_SCHEMA),
             ("encoded-size", false, &IntegerSchema::new("Encoded blob size.")
-             .minimum((std::mem::size_of::<DataBlobHeader>() as isize) +1)
+             .minimum(std::mem::size_of::<DataBlobHeader>() as isize)
              .maximum(1024*1024*16+(std::mem::size_of::<EncryptedDataBlobHeader>() as isize))
              .schema()
             )
-- 
2.20.1





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

* [pbs-devel] applied: [PATCH proxmox-backup] upload_chunk: allow upload of empty blobs
  2020-07-27 11:22 [pbs-devel] [PATCH proxmox-backup] upload_chunk: allow upload of empty blobs Dominik Csapak
@ 2020-07-28  9:05 ` Dietmar Maurer
  0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Maurer @ 2020-07-28  9:05 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

applied

> On 07/27/2020 1:22 PM Dominik Csapak <d.csapak@proxmox.com> wrote:
> 
>  
> a blob can be empty (e.g. an empty pct fw conf), so we
> have to set the minimum size to the header size
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> fixes the problem some users had, e.g.
> https://forum.proxmox.com/threads/ct-backup-error-parameter-encoded-size-value-must-have-a-minimum-value-of-13-got-12.73051/
> 
>  src/api2/backup/upload_chunk.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/api2/backup/upload_chunk.rs b/src/api2/backup/upload_chunk.rs
> index 483ced3..ec95472 100644
> --- a/src/api2/backup/upload_chunk.rs
> +++ b/src/api2/backup/upload_chunk.rs
> @@ -243,7 +243,7 @@ pub const API_METHOD_UPLOAD_BLOB: ApiMethod = ApiMethod::new(
>          &sorted!([
>              ("file-name", false, &crate::api2::types::BACKUP_ARCHIVE_NAME_SCHEMA),
>              ("encoded-size", false, &IntegerSchema::new("Encoded blob size.")
> -             .minimum((std::mem::size_of::<DataBlobHeader>() as isize) +1)
> +             .minimum(std::mem::size_of::<DataBlobHeader>() as isize)
>               .maximum(1024*1024*16+(std::mem::size_of::<EncryptedDataBlobHeader>() as isize))
>               .schema()
>              )
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel




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

end of thread, other threads:[~2020-07-28  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 11:22 [pbs-devel] [PATCH proxmox-backup] upload_chunk: allow upload of empty blobs Dominik Csapak
2020-07-28  9:05 ` [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