[pbs-devel] applied: [PATCH proxmox-backup] upload_chunk: allow upload of empty blobs

Dietmar Maurer dietmar at proxmox.com
Tue Jul 28 11:05:03 CEST 2020


applied

> On 07/27/2020 1:22 PM Dominik Csapak <d.csapak at 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 at 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 at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel





More information about the pbs-devel mailing list