bugsnag / bugsnag-ruby

BugSnag error monitoring & reporting software for rails, sinatra, rack and ruby
https://docs.bugsnag.com/platforms/ruby
MIT License
246 stars 174 forks source link

Allow partial strings on Rails `filter_parameters` for `meta_data_filters` #776

Open yykamei opened 1 year ago

yykamei commented 1 year ago

Goal

The Recent Rails template will generate filter_parameters with partial strings, such as :passw and :_key. I think this library should also allow such keywords to filter out, following the Rails template.

https://github.com/rails/rails/blob/f838a7421228204bbc1e012ff9a3801ed598da80/railties/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt#L6-L8

This patch might be a breaking change because it will filter more parameters than before, but to exclude them would be better than sending probably sensitive parameters as they are.

Design

I just removed \A and \z from the Regexp construction on a railtie as well as adding i to allow any cases to be matched.

Changeset

Testing

I updated Rails.application.config.filter_parameters inside features to be :passw from :password. It would be good if the End to end tests pass.

johnkiely1 commented 1 year ago

Hi @yykamei, Thanks for the PR, we will review when priorities allow.

yykamei commented 1 year ago

Hi @johnkiely1, I'm curious about the progress of this pull request. I'm ready to update any changes if they're necessary. Thank you!

clr182 commented 1 year ago

Hi @yykamei, due to the prioritization of other tasks we do not have an ETA on the review of this PR. We'd be happy to let you know once we have more information.

yykamei commented 1 year ago

Thank you for your reply.