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
Include the model name when filtering encrypted attributes. #44361
Include the model name when filtering encrypted attributes. #44361
Conversation
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.
Thanks ❤️
The change looks good
This only filters if the parameter is inside a form with the model name right? If anyone set a different name in the |
d24d533
to
bc92a6f
Compare
@rafaelfranca yes, you are correct. It will work as long as the resource/param name matches the model/attribute name. I think it's a sensible default, even knowing it won't work in all cases. The previous default was probably too coarse grained. I rebased and fixed conflicts. |
👍🏽 . There is a failing test though. |
3a9f4a1
to
d191135
Compare
Fixed that test @rafaelfranca. Build failing in an unrelated error now. |
just wanted to bump this PR. Sorry for the noise |
d191135
to
9c2fc77
Compare
For example, when encrypting `Person#name` it will add `person.name` as a filter parameter, instead of just `name`. This prevents unintended filtering of parameters with a matching name in other models. Closes rails#44330
9c2fc77
to
67d6183
Compare
For example, when encrypting
Person#name
it will addperson.name
as a filter parameter, instead of justname
. This prevents unintended filtering of parameters with a matching name in other models.Addresses the second concern in #44330.
CC @rafaelfranca @nvasilevski