DEV: Bump aws-sdk-sns from 1.13.0 to 1.21.0 (#8490)
Bumps [aws-sdk-sns](https://github.com/aws/aws-sdk-ruby) from 1.13.0 to 1.21.0. - [Release notes](https://github.com/aws/aws-sdk-ruby/releases) - [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-sns/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.13.0...1.21.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
This commit is contained in:
parent
4abe4454dd
commit
b90a592146
10
Gemfile.lock
10
Gemfile.lock
|
@ -45,10 +45,10 @@ GEM
|
|||
rake (>= 10.4, < 14.0)
|
||||
ast (2.4.0)
|
||||
aws-eventstream (1.0.3)
|
||||
aws-partitions (1.154.0)
|
||||
aws-sdk-core (3.48.6)
|
||||
aws-partitions (1.251.0)
|
||||
aws-sdk-core (3.84.0)
|
||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
||||
aws-partitions (~> 1.0)
|
||||
aws-partitions (~> 1, >= 1.239.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
jmespath (~> 1.0)
|
||||
aws-sdk-kms (1.17.0)
|
||||
|
@ -58,8 +58,8 @@ GEM
|
|||
aws-sdk-core (~> 3, >= 3.48.2)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.0)
|
||||
aws-sdk-sns (1.13.0)
|
||||
aws-sdk-core (~> 3, >= 3.48.2)
|
||||
aws-sdk-sns (1.21.0)
|
||||
aws-sdk-core (~> 3, >= 3.71.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sigv4 (1.1.0)
|
||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
||||
|
|
|
@ -11,6 +11,7 @@ def s3_setup
|
|||
SiteSetting.s3_access_key_id = "s3-access-key-id"
|
||||
SiteSetting.s3_secret_access_key = "s3-secret-access-key"
|
||||
SiteSetting.s3_cdn_url = "https://s3.cdn.com"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
SiteSetting.enable_s3_uploads = true
|
||||
SiteSetting.authorized_extensions = "png|jpg|gif|mov|ogg|"
|
||||
end
|
||||
|
@ -504,11 +505,18 @@ describe CookedPostProcessor do
|
|||
|
||||
context "s3_uploads" do
|
||||
before do
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
s3_setup
|
||||
stored_path = Discourse.store.get_path_for_upload(upload)
|
||||
upload.update_column(:url, "#{SiteSetting.Upload.absolute_base_url}/#{stored_path}")
|
||||
|
||||
stub_request(:any, /some-bucket-on-s3\.s3\.amazonaws\.com/)
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/optimized/1X/#{upload.sha1}_2_#{optimized_size}.#{upload.extension}"
|
||||
)
|
||||
|
||||
stub_request(:get, /#{SiteSetting.s3_upload_bucket}\.s3\.#{SiteSetting.s3_region}\.amazonaws\.com/)
|
||||
|
||||
OptimizedImage.expects(:resize).returns(true)
|
||||
FileStore::BaseStore.any_instance.expects(:get_depth_for).returns(0)
|
||||
|
@ -519,8 +527,10 @@ describe CookedPostProcessor do
|
|||
upload.update_column(:secure, true)
|
||||
end
|
||||
|
||||
let(:optimized_size) { "600x500" }
|
||||
|
||||
let(:post) do
|
||||
Fabricate(:post, raw: "![large.png|600x500](#{upload.short_url})")
|
||||
Fabricate(:post, raw: "![large.png|#{optimized_size}](#{upload.short_url})")
|
||||
end
|
||||
|
||||
it "handles secure images with the correct lightbox link href" do
|
||||
|
|
|
@ -53,6 +53,7 @@ RSpec.describe FileStore::BaseStore do
|
|||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "some key"
|
||||
SiteSetting.s3_secret_access_key = "some secret key"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
|
||||
stub_request(:get, upload_s3.url).to_return(status: 200, body: "Hello world")
|
||||
end
|
||||
|
@ -91,7 +92,7 @@ RSpec.describe FileStore::BaseStore do
|
|||
SiteSetting.login_required = true
|
||||
SiteSetting.secure_media = true
|
||||
|
||||
stub_request(:head, "https://s3-upload-bucket.s3.amazonaws.com/")
|
||||
stub_request(:head, "https://s3-upload-bucket.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
signed_url = Discourse.store.signed_url_for_path(upload_s3.url)
|
||||
stub_request(:get, signed_url).to_return(status: 200, body: "Hello world")
|
||||
|
||||
|
|
|
@ -1400,13 +1400,14 @@ describe PostCreator do
|
|||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "some key"
|
||||
SiteSetting.s3_secret_access_key = "some secret key"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
SiteSetting.secure_media = true
|
||||
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/")
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/original/1X/#{image_upload.sha1}.#{image_upload.extension}?acl"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/1X/#{image_upload.sha1}.#{image_upload.extension}?acl"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ describe "S3Helper" do
|
|||
SiteSetting.enable_s3_uploads = true
|
||||
SiteSetting.s3_access_key_id = "abc"
|
||||
SiteSetting.s3_secret_access_key = "def"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
|
||||
@lifecycle = <<~XML
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
@ -40,10 +41,10 @@ describe "S3Helper" do
|
|||
stub_request(:get, "http://169.254.169.254/latest/meta-data/iam/security-credentials/").
|
||||
to_return(status: 404, body: "", headers: {})
|
||||
|
||||
stub_request(:get, "https://bob.s3.amazonaws.com/?lifecycle").
|
||||
stub_request(:get, "https://bob.s3.#{SiteSetting.s3_region}.amazonaws.com/?lifecycle").
|
||||
to_return(status: 200, body: @lifecycle, headers: {})
|
||||
|
||||
stub_request(:put, "https://bob.s3.amazonaws.com/?lifecycle").
|
||||
stub_request(:put, "https://bob.s3.#{SiteSetting.s3_region}.amazonaws.com/?lifecycle").
|
||||
with do |req|
|
||||
|
||||
hash = Hash.from_xml(req.body.to_s)
|
||||
|
|
|
@ -299,6 +299,7 @@ describe OptimizedImage do
|
|||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "some key"
|
||||
SiteSetting.s3_secret_access_key = "some secret key"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
|
||||
tempfile = Tempfile.new(["discourse-external", ".png"])
|
||||
|
||||
|
@ -328,12 +329,12 @@ describe OptimizedImage do
|
|||
|
||||
stub_request(
|
||||
:head,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/"
|
||||
)
|
||||
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com#{optimized_path}"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com#{optimized_path}"
|
||||
).to_return(
|
||||
status: 200,
|
||||
headers: { "ETag" => "someetag" }
|
||||
|
|
|
@ -1326,19 +1326,20 @@ describe Post do
|
|||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "some key"
|
||||
SiteSetting.s3_secret_access_key = "some secret key"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
SiteSetting.secure_media = true
|
||||
attachment_upload.update!(original_filename: "hello.csv")
|
||||
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/")
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/original/1X/#{attachment_upload.sha1}.#{attachment_upload.extension}?acl"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/1X/#{attachment_upload.sha1}.#{attachment_upload.extension}?acl"
|
||||
)
|
||||
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/original/1X/#{image_upload.sha1}.#{image_upload.extension}?acl"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/1X/#{image_upload.sha1}.#{image_upload.extension}?acl"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -112,13 +112,14 @@ describe TopicConverter do
|
|||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "some key"
|
||||
SiteSetting.s3_secret_access_key = "some secret key"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
SiteSetting.secure_media = true
|
||||
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/")
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/original/1X/#{image_upload.sha1}.#{image_upload.extension}?acl"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/1X/#{image_upload.sha1}.#{image_upload.extension}?acl"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -347,14 +347,15 @@ describe Upload do
|
|||
SiteSetting.enable_s3_uploads = true
|
||||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "some key"
|
||||
SiteSetting.s3_secret_access_key = "some secret key"
|
||||
SiteSetting.s3_secret_access_key = "some secrets3_region key"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
SiteSetting.secure_media = true
|
||||
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/")
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
|
||||
stub_request(
|
||||
:put,
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.amazonaws.com/original/1X/#{upload.sha1}.#{upload.extension}?acl"
|
||||
"https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/1X/#{upload.sha1}.#{upload.extension}?acl"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -381,6 +381,7 @@ describe UploadsController do
|
|||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
SiteSetting.s3_access_key_id = "fakeid7974664"
|
||||
SiteSetting.s3_secret_access_key = "fakesecretid7974664"
|
||||
SiteSetting.s3_region = "us-east-1"
|
||||
SiteSetting.secure_media = true
|
||||
end
|
||||
|
||||
|
@ -393,7 +394,7 @@ describe UploadsController do
|
|||
it "should return signed url for legitimate request" do
|
||||
secure_url = upload.url.sub(SiteSetting.Upload.absolute_base_url, "/secure-media-uploads")
|
||||
sign_in(user)
|
||||
stub_request(:head, "https://s3-upload-bucket.s3.amazonaws.com/")
|
||||
stub_request(:head, "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/")
|
||||
|
||||
get secure_url
|
||||
|
||||
|
|
Loading…
Reference in New Issue