Skip to content

Commit

Permalink
Fix: #51254: Update filter_attributes to only add exact match
Browse files Browse the repository at this point in the history
  • Loading branch information
keshavbiswa committed Apr 6, 2024
1 parent 84c4598 commit bdb003e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
@@ -1,3 +1,7 @@
* Encrypted attributes will now be filtered by exact matches by FilterParameters.

*Keshav Biswa*

* Raise an `ActiveRecord::ActiveRecordError` error when the MySQL database returns an invalid version string.

*Kevin McPhillips*
Expand Down
Expand Up @@ -54,7 +54,7 @@ def apply_filter(klass, attribute)
filter = [("#{klass.model_name.element}" if klass.name), attribute.to_s].compact.join(".")
unless excluded_from_filter_parameters?(filter)
app.config.filter_parameters << filter unless app.config.filter_parameters.include?(filter)
klass.filter_attributes += [ attribute ]
klass.filter_attributes += [ /^#{attribute}$/ ]
end
end

Expand Down

0 comments on commit bdb003e

Please sign in to comment.