instance method
validate_message_data_format
Ruby on Rails 8.0.4
Since v7.0.10 PrivateSignature
validate_message_data_format(data, level)
No documentation comment.
Parameters
-
datareq -
levelreq
Source
# File activerecord/lib/active_record/encryption/message_serializer.rb, line 46
def validate_message_data_format(data, level)
if level > 2
raise ActiveRecord::Encryption::Errors::Decryption, "More than one level of hash nesting in headers is not supported"
end
unless data.is_a?(Hash) && data.has_key?("p")
raise ActiveRecord::Encryption::Errors::Decryption, "Invalid data format: hash without payload"
end
end
Defined in activerecord/lib/active_record/encryption/message_serializer.rb line 46
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Encryption::MessageSerializer