-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect S3 presigned_url when :host option passed #592
Comments
Thanks for reporting. Any idea how to get the AWS SDK to sign the URL with the custom host? I couldn't figure it out, nothing shows up in Google, nor can I see a way in the source code. |
Ugh. It looks like maybe you're supposed to pass the hostname as the argument when you create the https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#presigned_url-instance_method
|
Brief Description
URL with incorrect signature built for the private S3 bucket, when
host
option passed.Current
Shrine::Storage::S3.url
implementation replaces host (line 149) after signing (line 144).And it leads to SignatureDoesNotMatch because now the signature is invalid (checked on minio, but believe the same behavior will be on S3).
I think the host should be changed before signing.
shrine/lib/shrine/storage/s3.rb
Lines 140 to 151 in 0bb1a12
The text was updated successfully, but these errors were encountered: