/usr/lib/ruby/vendor_ruby/diaspora_federation/validators/message_validator.rb is in ruby-diaspora-federation 0.1.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | module DiasporaFederation
module Validators
# This validates a {Entities::Message}.
class MessageValidator < Validation::Validator
include Validation
rule :author, %i(not_empty diaspora_id)
rule :guid, :guid
rule :conversation_guid, :guid
rule :text, [:not_empty,
length: {maximum: 65_535}]
end
end
end
|