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

attr_encrypted key is returned in object #368

Open
adelatuduce opened this issue Mar 27, 2020 · 1 comment
Open

attr_encrypted key is returned in object #368

adelatuduce opened this issue Mar 27, 2020 · 1 comment

Comments

@adelatuduce
Copy link

adelatuduce commented Mar 27, 2020

Hello,

I have upgraded to Rails 5.2.4.1 and after that, whenever I retrieve any information from the object that has attr_encrypted on it, the key that is encrypted is returned as well and always with nil as value.

Example:

SourceCredential.first.attributes => {"id"=>2,
 "encrypted_access_key"=>"some encrypted text",
 "encrypted_access_key_iv"=>"some encryption iv",
 "access_key"=>nil,
 "encrypted_access_secret"=>"some encrypted text",
 "encrypted_access_secret_iv"=>"some encryption iv",
 "source_id"=>nil,
 "gateway_setting_id"=>nil,
 "created_at"=>Fri, 27 Mar 2020 11:33:15 UTC +00:00,
 "updated_at"=>Fri, 27 Mar 2020 11:33:15 UTC +00:00,
 "access_secret"=>nil}

where access_key and access_secret are the attr_encrypted attributes.

This did not use to happen on Rails 5.0.0, so I am not sure how to preserve that behavior. Any thoughts from anyone?

Thank you

@thebigw4lrus
Copy link

I can confirm this is happening exactly as this states. any thoughts?.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants