mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 19:01:37 +01:00
Prevent accidental serialization of Account
and User
records (#30079)
This commit is contained in:
parent
e336466894
commit
95e9de5777
1 changed files with 6 additions and 0 deletions
|
@ -22,4 +22,10 @@ class ApplicationRecord < ActiveRecord::Base
|
|||
value
|
||||
end
|
||||
end
|
||||
|
||||
# Prevent implicit serialization in ActiveModel::Serializer or other code paths.
|
||||
# This is a hardening step to avoid accidental leaking of attributes.
|
||||
def as_json
|
||||
raise NotImplementedError
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue