This file is indexed.

/usr/lib/ruby/vendor_ruby/certificate_authority/validations.rb is in ruby-certificate-authority 0.2.0~6dd483bf-1.

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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# This is a super simple replacement for ActiveSupport::Validations
#

module CertificateAuthority
  class Errors < Array
    def add(symbol, msg)
      self.push([symbol, msg])
    end
    def full_messages
      self.map {|i| i[0].to_s + ": " + i[1]}.join("\n")
    end
  end

  module Validations
    def valid?
      @errors = Errors.new
      validate
      errors.empty?
    end

    # must be overridden
    def validate
      raise NotImplementedError
    end

    def errors
      @errors ||= Errors.new
    end
  end
end