1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Prevent accidental serialization of Account and User records (#30079)

This commit is contained in:
Claire 2024-04-29 11:45:58 +02:00 committed by GitHub
parent e336466894
commit 95e9de5777
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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