Skip to content

Unable to set filename*= in CloudFront signer #7470

@kuhe

Description

@kuhe

Checkboxes for prior research

Describe the bug

In #7437, the encoding of the URL query parameters uses the extended encoding from @smithy, leading to the * (asterisk) character being encoded.

The * character has a practical application in the query parameter -- see comment in #7437

A related ticket was not properly resolved in #3614.

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/package-name@version, ...

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

all

Reproduction Steps

get a signed url with a query parameter such as

`?response-content-disposition=${encodeURIComponent(
  `attachment; filename=${encName}; filename*=UTF-8''${encName}`,
)}`

See section on filename* from https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Disposition.

Observed Behavior

signed request fails (likely 403?)

Expected Behavior

signed request succeeds

Possible Solution

use encodeURIComponent instead of extendedEncodeURIComponent

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.closing-soonThis issue will automatically close in 4 days unless further comments are made.p2This is a standard priority issuepotential-regressionMarking this issue as a potential regression to be checked by team member

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions