-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow partial strings on Rails
filter_parameters
for `meta_data_fil…
…ters` 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.
- Loading branch information
Showing
10 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
example/rails-42/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] |
2 changes: 1 addition & 1 deletion
2
example/rails-51/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] |
2 changes: 1 addition & 1 deletion
2
example/rails-60/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] |
2 changes: 1 addition & 1 deletion
2
features/fixtures/delayed_job/app/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] |
2 changes: 1 addition & 1 deletion
2
features/fixtures/rails4/app/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] | ||
Rails.application.config.filter_parameters += [:my_specific_filter] |
2 changes: 1 addition & 1 deletion
2
features/fixtures/rails5/app/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] | ||
Rails.application.config.filter_parameters += [:my_specific_filter] |
2 changes: 1 addition & 1 deletion
2
features/fixtures/rails6/app/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] | ||
Rails.application.config.filter_parameters += [:my_specific_filter] |
2 changes: 1 addition & 1 deletion
2
features/fixtures/rails7/app/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] | ||
Rails.application.config.filter_parameters += [:my_specific_filter] |
2 changes: 1 addition & 1 deletion
2
features/fixtures/rails_integrations/app/config/initializers/filter_parameter_logging.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
Rails.application.config.filter_parameters += [:password] | ||
Rails.application.config.filter_parameters += [:passw] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters