"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
dropbox: fix infinite loop on uploading a corrupted file
Nick Craig-Wood3a8e52de74e8
diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.goindex bcee49821..100044862 100644--- a/backend/dropbox/dropbox.go+++ b/backend/dropbox/dropbox.go@@ -1697,6 +1697,9 @@ func (o *Object) uploadChunked(ctx context.Context, in0 io.Reader, commitInfo *fif size > 0 {// if size is known, check if next chunk is finalappendArg.Close = uint64(size)-in.BytesRead() <= uint64(chunkSize)+ if in.BytesRead() > uint64(size) {+ return nil, fmt.Errorf("expected %d bytes in input, but have read %d so far", size, in.BytesRead())+ }} else {// if size is unknown, upload as long as we can read full chunks from the readerappendArg.Close = in.BytesRead()-cursor.Offset < uint64(chunkSize)