Skip to content
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

Exclude :ssl_params from Redis options clone without ActiveSupport #4545

Merged
merged 1 commit into from Apr 29, 2020
Merged

Exclude :ssl_params from Redis options clone without ActiveSupport #4545

merged 1 commit into from Apr 29, 2020

Conversation

geoffharcourt
Copy link
Contributor

In dd0a847 we started filtering out SSL params from the Redis options
cloning for logging purposes to prevent an undumpable
OpenSSL::X509::Store from raising an exception. The fix used
ActiveSupport's Hash#except to exclude the :ssl_params key from the
hash before cloning the options hash by dumping and reloading.

As ActiveSupport is not a requirement for Sidekiq, we need a more
generally-available solution. This change removes the key using
Hash#slice by including every top-level options key except
:ssl_params.

See #4532 (comment)

cc: #4532

In dd0a847 we started filtering out SSL params from the Redis options
cloning for logging purposes to prevent an undumpable
`OpenSSL::X509::Store` from raising an exception. The fix used
ActiveSupport's `Hash#except` to exclude the `:ssl_params` key from the
hash before cloning the options hash by dumping and reloading.

As ActiveSupport is not a requirement for Sidekiq, we need a more
generally-available solution. This change removes the key using
`Hash#slice` by including every top-level options key _except_
`:ssl_params`.
@mperham
Copy link
Collaborator

mperham commented Apr 29, 2020

Thank you for the quick fix!

@geoffharcourt geoffharcourt deleted the gh-stdlib-except branch April 29, 2020 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants