Skip to content

s3 is mutating the config #1125

Open
Open
@lesleydreyer

Description

@lesleydreyer

I noticed s3 started mutating the config by adding this $source object which even though it says "e" it doesn't look like it's an error. https://github.com/aws/aws-sdk-js-v3/pull/6546/files#diff-a3590b50e293ad26b5fac14d669025732f47d6c0da0f83527e317ab3848919caR364

"credentials": {
    "accessKeyId": "minioadmin",
    "secretAccessKey": "minioadmin",
    "$source": {
        "CREDENTIALS_CODE": "e"
    }
}

I think in createS3Client if we just change it from
return new BaseClient(finalConfig);
to
return new BaseClient(cloneDeep(finalConfig));
so it doesn't mutate the config passed to createS3Client, and ensure no other s3 functions are mutating things it should be good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions