method

validate_message_data_format

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: MessageSerializer
validate_message_data_format(data, level) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/encryption/message_serializer.rb, line 42
        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
Register or log in to add new notes.