Signed URL for private S3 file download link doesn't work when there are whitespaces in filename

Description

When Signed URL is generated with 'getFileLocation' when the file is a secure file type(ftSecure="true"), the link returns 'SignatureDoesNotMatch' error.

We now replace whitespaces with '-' when we do upload, however if files are migrated or uploaded before the replace fix, they still could have whitespaces in the file name and the download link won't work.

Environment

None

Activity

Show:

KenK September 7, 2016 at 1:19 AM

This is an url encoding issue when we build the download url path for s3.

The encoding that Amazon does for whitespace is actually using 'plus sign'(%2B), but in core, we use 'space'(%20).

This is fixed by replacing the whitespace encoding to 'plus sign'(%2B).

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created September 7, 2016 at 1:11 AM
Updated February 23, 2018 at 6:14 AM
Resolved September 7, 2016 at 1:25 AM