/[packages]/updates/1/ruby/current/SOURCES/ruby-2.0.0-add-missing-rexml-require.patch
ViewVC logotype

Contents of /updates/1/ruby/current/SOURCES/ruby-2.0.0-add-missing-rexml-require.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 401798 - (show annotations) (download)
Fri Mar 8 18:47:46 2013 UTC (8 years, 5 months ago) by luigiwalser
File size: 2232 byte(s)
add patches from redhat to fix CVE-2013-1821
1 Index: lib/rexml/document.rb
2 ===================================================================
3 --- lib/rexml/document.rb (revision 39508)
4 +++ lib/rexml/document.rb (revision 39509)
5 @@ -213,16 +213,18 @@
6 return @@entity_expansion_limit
7 end
8
9 - @@entity_expansion_text_limit = 10_240
10 -
11 # Set the entity expansion limit. By default the limit is set to 10240.
12 + #
13 + # Deprecated. Use REXML.entity_expansion_text_limit= instead.
14 def Document::entity_expansion_text_limit=( val )
15 - @@entity_expansion_text_limit = val
16 + REXML.entity_expansion_text_limit = val
17 end
18
19 # Get the entity expansion limit. By default the limit is set to 10240
20 + #
21 + # Deprecated. Use REXML.entity_expansion_text_limit instead.
22 def Document::entity_expansion_text_limit
23 - return @@entity_expansion_text_limit
24 + return REXML.entity_expansion_text_limit
25 end
26 attr_reader :entity_expansion_count
27
28 Index: lib/rexml/text.rb
29 ===================================================================
30 --- lib/rexml/text.rb (revision 39508)
31 +++ lib/rexml/text.rb (revision 39509)
32 @@ -1,3 +1,4 @@
33 +require 'rexml/rexml'
34 require 'rexml/entity'
35 require 'rexml/doctype'
36 require 'rexml/child'
37 @@ -383,7 +384,7 @@
38 sum = 0
39 string.gsub( /\r\n?/, "\n" ).gsub( REFERENCE ) {
40 s = Text.expand($&, doctype, filter)
41 - if sum + s.bytesize > Document.entity_expansion_text_limit
42 + if sum + s.bytesize > REXML.entity_expansion_text_limit
43 raise "entity expansion has grown too large"
44 else
45 sum += s.bytesize
46 Index: lib/rexml/rexml.rb
47 ===================================================================
48 --- lib/rexml/rexml.rb (revision 39508)
49 +++ lib/rexml/rexml.rb (revision 39509)
50 @@ -28,4 +28,16 @@
51
52 Copyright = COPYRIGHT
53 Version = VERSION
54 +
55 + @@entity_expansion_text_limit = 10_240
56 +
57 + # Set the entity expansion limit. By default the limit is set to 10240.
58 + def self.entity_expansion_text_limit=( val )
59 + @@entity_expansion_text_limit = val
60 + end
61 +
62 + # Get the entity expansion limit. By default the limit is set to 10240.
63 + def self.entity_expansion_text_limit
64 + return @@entity_expansion_text_limit
65 + end
66 end

  ViewVC Help
Powered by ViewVC 1.1.28