Class: REXML::Document

Inherits:
Element
  • Object
show all
Defined in:
lib/rails-security-backports/ruby-cve-backports/cve-2008-3790.rb,
lib/rails-security-backports/ruby-cve-backports/cve-2014-8090.rb

Instance Method Summary collapse

Instance Method Details

#documentObject



8
9
10
# File 'lib/rails-security-backports/ruby-cve-backports/cve-2014-8090.rb', line 8

def document
  self
end

#record_entity_expansion!Object



37
38
39
40
41
42
43
# File 'lib/rails-security-backports/ruby-cve-backports/cve-2008-3790.rb', line 37

def record_entity_expansion!
  @number_of_expansions ||= 0
  @number_of_expansions += 1
  if @number_of_expansions > Security.entity_expansion_limit
    raise "Processing aborted: number of entity expansions (#{@number_of_expansions}) exceeded the limit (#{Security.entity_expansion_limit})."
  end
end