Skip to content

Etag causes file download issues #1372

@duckboy81

Description

@duckboy81

We observed issues where an etag could contain a / and when minio attempted to write a file part to disk, the forward slash would be interpreted as a new directory causing a write failure.

For instance, here's a redacted example that throws an error

// With filepath
const filePath = `/tmp/miniofileloader-nOEryq/abcd/hotdog - Copy - Copy.txt`;

// With eTag
const etag = `-COOY/tG864oDEAE=`;

// Resultant "partFile"
const partFile = `/tmp/miniofileloader-nOEryq/abcd/hotdog - Copy - Copy.txt.-COOY/tG864oDEAE=.part.minio`;

const downloadToTmpFile = async (): Promise<string> => {
let partFileStream: stream.Writable
const objStat = await this.statObject(bucketName, objectName, getOpts)
const partFile = `${filePath}.${objStat.etag}.part.minio`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions