VersionID not named, breaks Signature parameter

Created on 19 March 2018, almost 7 years ago
Updated 15 January 2025, about 2 months ago

When versioning is turned on for the S3 bucket, the module captures the versionId, as designed. However, when adding the versionID to the uri, it doesn't name the parameter as the versionId, as is specified here: https://docs.aws.amazon.com/AmazonS3/latest/dev/RetrievingObjectVersions...

It would be simple enough to add the name to the getExternalUrl method at line 430 of S3fsStreamWrapper.inc but I fear this would have unanticipated consequences. To test the functionality I used an image that had been uploaded with this module to an S3 bucket with versioning enabled. With the current behaviour (no name for the parameter) the image loads fine, but I suspect the versionId is being ignored. If I update the URL to be "[pathtofile]?versionId=[version]" instead of just "[pathtofile]?[version]" it gives me an authentication error. This doesn't seem to be expected behaviour, so it might also be necessary to allow some kind of setting as to whether or not the versionId should be appended. I'm not sure if this should be on a file-by-file basis or global per site.

As mentioned in the title, I first came across this issue because the current behaviour breaks any URLs that contain a Signature, as the version as read as part of the signature when it isn't explicitly named.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Drupal 7 end-of-life triage:
    Drupal 7 reached end of life on January 5th.

    The 7.x branches of S3FS do not have any additional planned releases.

    The requests in this issue do not appear to exist in the 8.x-3.x and newer branches.

Production build 0.71.5 2024