Skip to content

Commit

Permalink
make sure we remove all sensitive rack vars
Browse files Browse the repository at this point in the history
  • Loading branch information
shifi committed Jun 11, 2015
1 parent 4a6dcf8 commit 6b444d9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/params_cleaner_test.rb
Expand Up @@ -62,8 +62,25 @@ def assert_filters_hash(attribute)
assert_equal({"abc" => "123"}, clean_params.cgi_data)
end

should "remove rack.request.form_vars" do
should "remove sensitive rack vars" do
original = {
"HTTP_X_CSRF_TOKEN" => "remove_me",
"HTTP_COOKIE" => "remove_me",
"HTTP_AUTHORIZATION" => "remove_me",
"action_dispatch.request.unsigned_session_cookie" => "remove_me",
"action_dispatch.cookies" => "remove_me",
"action_dispatch.unsigned_session_cookie" => "remove_me",
"action_dispatch.secret_key_base" => "remove_me",
"action_dispatch.signed_cookie_salt" => "remove_me",
"action_dispatch.encrypted_cookie_salt" => "remove_me",
"action_dispatch.encrypted_signed_cookie_salt" => "remove_me",
"action_dispatch.http_auth_salt" => "remove_me",
"action_dispatch.secret_token" => "remove_me",
"rack.request.cookie_hash" => "remove_me",
"rack.request.cookie_string" => "remove_me",
"rack.request.form_vars" => "remove_me",
"rack.session" => "remove_me",
"rack.session.options" => "remove_me",
"rack.request.form_vars" => "story%5Btitle%5D=The+TODO+label",
"abc" => "123"
}
Expand Down

3 comments on commit 6b444d9

@fproulx-pbox
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shifi when do you plan on releasing v4.2.2 to include this patch.
We need it to avoid leaking sensitive data - otherwise we'd need to disable Airbrake and I don't like us running against you master branch...

@shifi
Copy link
Contributor Author

@shifi shifi commented on 6b444d9 Jun 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fproulx-pbox I will release new minor version next week which will also include whitelist approach for params filters. Thank you for your patience.

@shifi
Copy link
Contributor Author

@shifi shifi commented on 6b444d9 Jun 24, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fproulx-pbox I just released new gem version

Please sign in to comment.