mirror of https://github.com/tootsuite/mastodon
Prevent accidental serialization of `Account` and `User` records (#30079)
parent
e336466894
commit
95e9de5777
|
@ -22,4 +22,10 @@ class ApplicationRecord < ActiveRecord::Base
|
||||||
value
|
value
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue