-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make parameters filter more strict #811
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
Make parameters filter more strict #811
Conversation
@@ -1,7 +1,7 @@ | |||
module Doorkeeper | |||
class Engine < Rails::Engine | |||
initializer "doorkeeper.params.filter" do |app| | |||
app.config.filter_parameters += [:client_secret, :code, :token] | |||
app.config.filter_parameters << /^(client_secret|code|authentication_token|access_token|refresh_token)$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [110/80]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested rewrite:
parameters = %w(client_secret code authentication_token access_token refresh_token)
app.config.filter_parameters << /^(#{Regexp.union parameters})$/
Thank you, @Tensho! Can you please:
Then I'll merge this in. Thank you very much! :) |
b19e517
to
29b1693
Compare
@@ -1,7 +1,8 @@ | |||
module Doorkeeper | |||
class Engine < Rails::Engine | |||
initializer "doorkeeper.params.filter" do |app| | |||
app.config.filter_parameters += [:client_secret, :code, :token] | |||
parameters = %w(client_secret code authentication_token access_token refresh_token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [89/80]
Thank you! |
…-parameters Make parameters filter more strict
#810
#792
rails/rails#24346