kjvarga / sitemap_generator

SitemapGenerator is a framework-agnostic XML Sitemap generator written in Ruby with automatic Rails integration. It supports Video, News, Image, Mobile, PageMap and Alternate Links sitemap extensions and includes Rake tasks for managing your sitemaps, as well as many other great features.
MIT License
2.44k stars 276 forks source link

Only set :endpoint from legacy option if present (AwsSdkAdapter) #389

Closed zokioki closed 2 years ago

zokioki commented 2 years ago

In the aws-sdk-core gem, the endpoint option is meant for overriding the default endpoint value resolved from the region option. Passing a nil value for the endpoint option is not the same as not passing it at all, as nil is still considered to be an override.

A recent refactor to the AwsSdkAdapter looks to have tweaked the logic to always include the endpoint option in the object being passed to Aws::S3::Resource. By default, this will raise a missing required option :endpoint exception as the default legacy option of nil will be set for the endpoint.

This change ensures that the endpoint value isn't set if the legacy option is not specified.

kjvarga commented 2 years ago

Thanks for the bugfix and for letting me know about the issue! I've taken this and improved on it because I saw some other potential issues with the other options.

Released in v6.2.1