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

Filter out decrypted attributes in ActiveRecord #354

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 21, 2019

  1. Configuration menu
    Copy the full SHA
    3e5b7fa View commit details
    Browse the repository at this point in the history
  2. Filter decrypted attributes

    e19445a introduced marking
    attr_encrypted attributes as virtual attributes to avoid an ActiveRecord
    deprecation warning in AR 5.1.  This had the side effect of exposing
    the decrypted versions of the attributes in
    `ActiveRecord::Base#attributes`.  This is problematic since the method
    is leveraged for things like `#as_json` and `respond_with`, meaning a
    user could inadvertely expose sensitive info with an action like:
    
    ```
      def show
        respond_with @user
      end
    ```
    stevenjackson committed Aug 21, 2019
    Configuration menu
    Copy the full SHA
    e1ec453 View commit details
    Browse the repository at this point in the history