mwmitchell-rsolr 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/CHANGES.txt +41 -0
  2. data/LICENSE +201 -0
  3. data/README.rdoc +191 -0
  4. data/Rakefile +40 -0
  5. data/examples/direct.rb +20 -0
  6. data/examples/http.rb +16 -0
  7. data/lib/core_ext.rb +8 -0
  8. data/lib/rsolr.rb +34 -0
  9. data/lib/rsolr/connection.rb +7 -0
  10. data/lib/rsolr/connection/adapter.rb +7 -0
  11. data/lib/rsolr/connection/adapter/common_methods.rb +46 -0
  12. data/lib/rsolr/connection/adapter/direct.rb +80 -0
  13. data/lib/rsolr/connection/adapter/http.rb +51 -0
  14. data/lib/rsolr/connection/base.rb +121 -0
  15. data/lib/rsolr/connection/search_ext.rb +126 -0
  16. data/lib/rsolr/http_client.rb +115 -0
  17. data/lib/rsolr/http_client/adapter.rb +6 -0
  18. data/lib/rsolr/http_client/adapter/curb.rb +51 -0
  19. data/lib/rsolr/http_client/adapter/net_http.rb +48 -0
  20. data/lib/rsolr/indexer.rb +23 -0
  21. data/lib/rsolr/mapper.rb +62 -0
  22. data/lib/rsolr/mapper/rss.rb +29 -0
  23. data/lib/rsolr/message.rb +73 -0
  24. data/lib/rsolr/response.rb +8 -0
  25. data/lib/rsolr/response/base.rb +33 -0
  26. data/lib/rsolr/response/index_info.rb +22 -0
  27. data/lib/rsolr/response/query.rb +170 -0
  28. data/lib/rsolr/response/update.rb +4 -0
  29. data/test/connection/direct_test.rb +22 -0
  30. data/test/connection/http_test.rb +19 -0
  31. data/test/connection/search_ext_test_methods.rb +17 -0
  32. data/test/connection/test_methods.rb +122 -0
  33. data/test/http_client/curb_test.rb +19 -0
  34. data/test/http_client/net_http_test.rb +13 -0
  35. data/test/http_client/test_methods.rb +40 -0
  36. data/test/http_client/util_test.rb +40 -0
  37. data/test/mapper_test.rb +123 -0
  38. data/test/message_test.rb +87 -0
  39. data/test/pagination_test.rb +58 -0
  40. data/test/ruby-lang.org.rss.xml +391 -0
  41. data/test/test_helpers.rb +39 -0
  42. metadata +107 -0
@@ -0,0 +1,40 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'test_helpers')
2
+
3
+ class HTTPUtilTest < RSolrBaseTest
4
+
5
+ class DummyClass
6
+ include RSolr::HTTPClient::Util
7
+ end
8
+
9
+ def setup
10
+ @c = DummyClass.new
11
+ end
12
+
13
+ def test_build_url
14
+ m = @c.method(:build_url)
15
+ assert_equal '/something', m.call('/something')
16
+ assert_equal '/something?q=Testing', m.call('/something', :q=>'Testing')
17
+ assert_equal '/something?array=1&array=2&array=3', m.call('/something', :array=>[1, 2, 3])
18
+ assert_equal '/something?array=1&array=2&array=3&q=A', m.call('/something', :q=>'A', :array=>[1, 2, 3])
19
+ end
20
+
21
+ def test_escape
22
+ assert_equal '%2B', @c.escape('+')
23
+ assert_equal 'This+is+a+test', @c.escape('This is a test')
24
+ assert_equal '%3C%3E%2F%5C', @c.escape('<>/\\')
25
+ assert_equal '%22', @c.escape('"')
26
+ assert_equal '%3A', @c.escape(':')
27
+ end
28
+
29
+ def test_hash_to_params
30
+ my_params = {
31
+ :z=>'should be last',
32
+ :q=>'test',
33
+ :d=>[1, 2, 3, 4],
34
+ :b=>:zxcv,
35
+ :x=>['!', '*', nil]
36
+ }
37
+ assert_equal 'b=zxcv&d=1&d=2&d=3&d=4&q=test&x=%21&x=%2A&z=should+be+last', @c.hash_to_params(my_params)
38
+ end
39
+
40
+ end
@@ -0,0 +1,123 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helpers')
2
+
3
+ require 'rss'
4
+
5
+ class MapperTest < RSolrBaseTest
6
+
7
+ # simple replacement
8
+ def test_string_map
9
+ data = {
10
+ :skip_this=>'!'
11
+ }
12
+ mapping = {
13
+ :id=>'one',
14
+ :name=>'foo'
15
+ }
16
+ mapper = RSolr::Mapper::Base.new(mapping)
17
+ expected = [mapping]
18
+ assert_equal expected, mapper.map(data)
19
+ end
20
+
21
+ def test_map_yields_if_block_given
22
+ data = {
23
+ :NUMID=>100,
24
+ :type=>:type_val,
25
+ :code=>:code_val
26
+ }
27
+ mapping = {
28
+ :id=>:NUMID,
29
+ :name=>'foo',
30
+ :category=>[:type, :code]
31
+ }
32
+ mapper = RSolr::Mapper::Base.new(mapping)
33
+ expected = [{:name=>"foo", :category=>[:type_val, :code_val], :id=>100}]
34
+ result = mapper.map(data) do |doc|
35
+ assert expected, doc
36
+ end
37
+ end
38
+
39
+ # test enumerable/array mappings
40
+ def test_array_multi_value
41
+ data = {
42
+ :NUMID=>100,
43
+ :type=>:type_val,
44
+ :code=>:code_val
45
+ }
46
+ mapping = {
47
+ :id=>:NUMID,
48
+ :name=>'foo',
49
+ :category=>[:type, :code]
50
+ }
51
+ mapper = RSolr::Mapper::Base.new(mapping)
52
+ expected = [{:name=>"foo", :category=>[:type_val, :code_val], :id=>100}]
53
+ assert_equal expected, mapper.map(data)
54
+ end
55
+
56
+ # test the proc mapping type
57
+ # test that the second arg in the block is a Solr::Mapper
58
+ def test_proc
59
+ data = [{:name=>'-bach;'}]
60
+ mapping = {
61
+ :name=>proc{|d,index|
62
+ assert_equal Fixnum, index.class
63
+ d[:name].gsub(/\W+/, '')
64
+ }
65
+ }
66
+ mapper = RSolr::Mapper::Base.new(mapping)
67
+ expected = [{:name=>"bach"}]
68
+ assert_equal expected, mapper.map(data)
69
+ end
70
+
71
+ def rss_file
72
+ @rss_file ||= File.join(File.dirname(__FILE__), 'ruby-lang.org.rss.xml')
73
+ end
74
+
75
+ # load an rss feed
76
+ # create a mapping
77
+ # map it and test the fields
78
+ def raw_mapping_rss_docs
79
+ rss = RSS::Parser.parse(File.read(rss_file), false)
80
+ mapping = {
81
+ :channel=>rss.channel.title,
82
+ :url=>rss.channel.link,
83
+ :total=>rss.items.size,
84
+ :title=>proc {|item,index| item.title },
85
+ :link=>proc{|item,index| item.link },
86
+ :published=>proc{|item,index| item.date },
87
+ :description=>proc{|item,index| item.description }
88
+ }
89
+ mapper = RSolr::Mapper::Base.new(mapping)
90
+ mapper.map(rss.items)
91
+ end
92
+
93
+ # load an rss feed
94
+ # create a mapping
95
+ # map it and test the fields
96
+ def rss_mapper_docs
97
+ m = RSolr::Mapper::RSS.new
98
+ mapping = {
99
+ :channel=>:'channel.title',
100
+ :url=>:'channel.link',
101
+ :total=>:'items.size',
102
+ :title=>proc {|item,index| item.title },
103
+ :link=>proc {|item,index| item.link },
104
+ :published=>proc {|item,index| item.date },
105
+ :description=>proc {|item,index| item.description }
106
+ }
107
+ m.map(rss_file, mapping)
108
+ end
109
+
110
+ def test_rss
111
+ [rss_mapper_docs, raw_mapping_rss_docs].each do |docs|
112
+ assert_equal 10, docs.size
113
+ first = docs.first
114
+ # make sure the mapped solr docs have all of the keys from the mapping
115
+ #assert mapping.keys.all?{|mapping_key| first.keys.include?(mapping_key) }
116
+ assert_equal docs.size, docs.first[:total].to_i
117
+ assert_equal Time.parse('Mon Nov 10 09:55:53 -0500 2008'), first[:published]
118
+ assert_equal 'http://www.ruby-lang.org/en/feeds/news.rss/', first[:url]
119
+ assert_equal 'Scotland on Rails 2009', first[:title]
120
+ end
121
+ end
122
+
123
+ end
@@ -0,0 +1,87 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helpers')
2
+
3
+ class MessageTest < RSolrBaseTest
4
+
5
+ # call all of the simple methods...
6
+ # make sure the xml string is valid
7
+ # ensure the class is actually Solr::XML
8
+ def test_simple_methods
9
+ [:optimize, :rollback, :commit].each do |meth|
10
+ result = RSolr::Message.send(meth)
11
+ assert_equal "<#{meth}/>", result.to_s
12
+ assert_equal String, result.class
13
+ end
14
+ end
15
+
16
+ def test_add_yields_field_attrs_if_block_given
17
+ result = RSolr::Message.add({:id=>1}, :boost=>200.00) do |hash_doc, doc_xml_attrs|
18
+ doc_xml_attrs[:boost] = 10
19
+ end
20
+ assert_equal '<add boost="200.0"><doc><field name="id" boost="10">1</field></doc></add>', result
21
+ end
22
+
23
+ def test_delete_by_id
24
+ result = RSolr::Message.delete_by_id(10)
25
+ assert_equal String, result.class
26
+ assert_equal '<delete><id>10</id></delete>', result.to_s
27
+ end
28
+
29
+ def test_delete_by_multiple_ids
30
+ result = RSolr::Message.delete_by_id([1, 2, 3])
31
+ assert_equal String, result.class
32
+ assert_equal '<delete><id>1</id><id>2</id><id>3</id></delete>', result.to_s
33
+ end
34
+
35
+ def test_delete_by_query
36
+ result = RSolr::Message.delete_by_id('status:"LOST"')
37
+ assert_equal String, result.class
38
+ assert_equal '<delete><id>status:"LOST"</id></delete>', result.to_s
39
+ end
40
+
41
+ def test_delete_by_multiple_queries
42
+ result = RSolr::Message.delete_by_id(['status:"LOST"', 'quantity:0'])
43
+ assert_equal String, result.class
44
+ assert_equal '<delete><id>status:"LOST"</id><id>quantity:0</id></delete>', result.to_s
45
+ end
46
+
47
+ # add a single hash ("doc")
48
+ def test_add_hash
49
+ data = {
50
+ :id=>1,
51
+ :name=>'matt'
52
+ }
53
+
54
+ expected = '<add><doc><field name="id">1</field><field name="name">matt</field></doc></add>'
55
+ assert_equal expected, RSolr::Message.add(data).to_s
56
+ end
57
+
58
+ # add an array of hashes
59
+ def test_add_array
60
+ data = [
61
+ {
62
+ :id=>1,
63
+ :name=>'matt'
64
+ },
65
+ {
66
+ :id=>2,
67
+ :name=>'sam'
68
+ }
69
+ ]
70
+
71
+ message = RSolr::Message.add(data)
72
+ expected = '<add><doc><field name="id">1</field><field name="name">matt</field></doc><doc><field name="id">2</field><field name="name">sam</field></doc></add>'
73
+
74
+ assert_equal expected, message.to_s
75
+ end
76
+
77
+ # multiValue field support test, thanks to Fouad Mardini!
78
+ def test_add_multi_valued_field
79
+ data = {
80
+ :id => 1,
81
+ :name => ['matt1', 'matt2']
82
+ }
83
+ expected = '<add><doc><field name="id">1</field><field name="name">matt1</field><field name="name">matt2</field></doc></add>'
84
+ assert_equal expected, RSolr::Message.add(data).to_s
85
+ end
86
+
87
+ end
@@ -0,0 +1,58 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helpers')
2
+
3
+ class PaginationTest < RSolrBaseTest
4
+
5
+ def create_response(params={})
6
+ response = RSolr::Response::Query::Base.new(mock_query_response)
7
+ response.params.merge! params
8
+ response
9
+ end
10
+
11
+ # test the Solr::Connection pagination methods
12
+ def test_connection_calculate_start
13
+ dummy_connection = RSolr::Connection::Base.new(nil)
14
+ assert_equal 15, dummy_connection.send(:calculate_start, 2, 15)
15
+ assert_equal 450, dummy_connection.send(:calculate_start, 10, 50)
16
+ assert_equal 0, dummy_connection.send(:calculate_start, 0, 50)
17
+ end
18
+
19
+ def test_connection_modify_params_for_pagination
20
+ dummy_connection = RSolr::Connection::Base.new(nil)
21
+ p = dummy_connection.send(:modify_params_for_pagination, {:page=>1})
22
+ assert_equal 0, p[:start]
23
+ assert_equal 10, p[:rows]
24
+ #
25
+ p = dummy_connection.send(:modify_params_for_pagination, {:page=>10, :per_page=>100})
26
+ assert_equal 900, p[:start]
27
+ assert_equal 100, p[:rows]
28
+ end
29
+
30
+ def test_math
31
+ response = create_response({'rows'=>5})
32
+ assert_equal response.params['rows'], response.per_page
33
+ assert_equal 26, response.total
34
+ assert_equal 1, response.current_page
35
+ assert_equal 6, response.total_pages
36
+
37
+ # now switch the rows (per_page)
38
+ # total and current page should remain the same value
39
+ # page_count should change
40
+
41
+ response = create_response({'rows'=>2})
42
+ assert_equal response.params['rows'], response.per_page
43
+ assert_equal 26, response.total
44
+ assert_equal 1, response.current_page
45
+ assert_equal 13, response.total_pages
46
+
47
+ # now switch the start
48
+
49
+ response = create_response({'rows'=>3})
50
+ response.instance_variable_set '@start', 4
51
+ assert_equal response.params['rows'], response.per_page
52
+ assert_equal 26, response.total
53
+ # 2 per page, currently on the 10th item
54
+ assert_equal 2, response.current_page
55
+ assert_equal 9, response.total_pages
56
+ end
57
+
58
+ end
@@ -0,0 +1,391 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
3
+ <channel>
4
+ <title>Ruby News</title>
5
+ <link>http://www.ruby-lang.org/en/feeds/news.rss/</link>
6
+ <language>en-us</language>
7
+ <ttl>40</ttl>
8
+ <description>The latest news from Ruby-Lang.org.</description>
9
+
10
+
11
+ <item>
12
+ <title>Scotland on Rails 2009</title>
13
+ <description>&lt;p&gt;&lt;a href=&quot;http://scotlandonrails.com&quot;&gt;Scotland on Rails&lt;/a&gt; is pleased to announce that Conference2009 will be held March 26-28 in Edinburgh, Scotland.&lt;/p&gt;
14
+
15
+
16
+ &lt;p&gt;We are now accepting submissions. The closing date for submissions is December 1st 2008, so there&amp;#8217;s still time! Please mail your plaintext proposals for 45 minute sessions to &lt;a href=&quot;mailto:submissions@scotlandonrails.com&quot;&gt;submissions@scotlandonrails.com&lt;/a&gt;.&lt;/p&gt;
17
+
18
+
19
+ &lt;p&gt;Alternatively, if you are interested in sponsoring the conference, please mail &lt;a href=&quot;mailto:sponsorship@scotlandonrails.com&quot;&gt;sponsorship@scotlandonrails.com&lt;/a&gt; for a prospectus.&lt;/p&gt;
20
+
21
+
22
+ &lt;p&gt;Lastly, if you wish to be notified when we open for registration, you can sign up on the site.&lt;/p&gt;
23
+
24
+
25
+ &lt;p&gt;Come and enjoy all that Edinburgh has to offer (whisky! castle! volcano! ruby! whisky!) in March. We hope to see you there.&lt;/p&gt; </description>
26
+ <pubDate>Mon, 10 Nov 2008 14:55:53 GMT</pubDate>
27
+ <guid>http://www.ruby-lang.org/en/news/2008/11/10/scotland-on-rails-2009/</guid>
28
+ <link>http://www.ruby-lang.org/en/news/2008/11/10/scotland-on-rails-2009/</link>
29
+ </item>
30
+
31
+ <item>
32
+ <title>MountainWest RubyConf 2009 dates and CFP</title>
33
+ <description>&lt;p&gt;&lt;a href=&quot;http://mtnwestrubyconf.org&quot;&gt;MountainWest RubyConf 2009&lt;/a&gt; will be held March 13-14, 2009, in Salt Lake City, Utah, &lt;span class=&quot;caps&quot;&gt;USA&lt;/span&gt;.&lt;/p&gt;
34
+
35
+
36
+ &lt;p&gt;Proposals to speak at this regional conference are now being accepted. Please send your proposal to proposals@mtnwestrubyconf.org.&lt;/p&gt;
37
+
38
+
39
+ &lt;p&gt;The submission deadline is midnight (MST) on December 31st, 2008.&lt;/p&gt;
40
+
41
+
42
+ &lt;p&gt;There are sponsorship opportunities available as well. Please contact sponsorship@mtnwestruby.org if you are interested.&lt;/p&gt;
43
+
44
+
45
+ &lt;p&gt;Please see &lt;a href=&quot;http://mtnwestrubyconf.org&quot;&gt;mtnwestrubyconf.org/&lt;/a&gt; for more details as they become available.&lt;/p&gt; </description>
46
+ <pubDate>Sat, 08 Nov 2008 15:03:32 GMT</pubDate>
47
+ <guid>http://www.ruby-lang.org/en/news/2008/11/08/mountainwest-rubyconf-2009-dates-and-cfp/</guid>
48
+ <link>http://www.ruby-lang.org/en/news/2008/11/08/mountainwest-rubyconf-2009-dates-and-cfp/</link>
49
+ </item>
50
+
51
+ <item>
52
+ <title> Ruby 1.9.1-preview 1 released</title>
53
+ <description>&lt;p&gt;Yugui (Yuki Sonoda) announced the release of Ruby 1.9.1-preview 1:&lt;/p&gt;
54
+
55
+
56
+ &lt;blockquote&gt;
57
+ This is a preview release of Ruby 1.9.1, which will be the first stable version of the Ruby 1.9 series. Try it out now and get an early taste of a modern, faster, multilingualized, and much improved Ruby with clearer syntax.&lt;br&gt;&lt;br&gt;
58
+
59
+ &lt;p&gt;If you encounter any bugs or problems, please let us know via the official issue tracking system:&lt;/p&gt;
60
+
61
+
62
+ &lt;p&gt;&lt;a href=&quot;http://redmine.ruby-lang.org&quot;&gt;http://redmine.ruby-lang.org&lt;/a&gt;&lt;/p&gt;
63
+
64
+
65
+ &lt;/blockquote&gt;
66
+
67
+ &lt;p&gt;You can download the release from;&lt;/p&gt;
68
+
69
+
70
+ &lt;ul&gt;
71
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.bz2&quot;&gt;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.bz2&lt;/a&gt;
72
+
73
+ &lt;p&gt;&lt;span class=&quot;caps&quot;&gt;SIZE&lt;/span&gt;: 6169022 bytes
74
+ &lt;span class=&quot;caps&quot;&gt;MD5&lt;/span&gt;: 0d51dc949bb6b438ad4ebfabbb5f6754
75
+ &lt;span class=&quot;caps&quot;&gt;SHA256&lt;/span&gt;: dc39000537d7c7528ef26af8e1c3a6215b30b6c579c615eaec7013513410456a&lt;/p&gt;&lt;/li&gt;
76
+ &lt;/ul&gt;
77
+
78
+
79
+ &lt;ul&gt;
80
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.gz&quot;&gt;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.gz&lt;/a&gt;
81
+
82
+ &lt;p&gt;&lt;span class=&quot;caps&quot;&gt;SIZE&lt;/span&gt;: 7409682 bytes
83
+ &lt;span class=&quot;caps&quot;&gt;MD5&lt;/span&gt;: 738f701532452fd5d36f5c155f3ba692
84
+ &lt;span class=&quot;caps&quot;&gt;SHA256&lt;/span&gt;: 99443bdae9f94ba7b08de187881f8cbee172379edf9c5fa85fc04c869150ff6d&lt;/p&gt;&lt;/li&gt;
85
+ &lt;/ul&gt;
86
+
87
+
88
+ &lt;ul&gt;
89
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.zip&quot;&gt;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.zip&lt;/a&gt;
90
+
91
+ &lt;p&gt;&lt;span class=&quot;caps&quot;&gt;SIZE&lt;/span&gt;: 8569116 bytes
92
+ &lt;span class=&quot;caps&quot;&gt;MD5&lt;/span&gt;: 5f68246246c4cd29d8a3b6b34b29b6ac
93
+ &lt;span class=&quot;caps&quot;&gt;SHA256&lt;/span&gt;: a6c3a7bf7ea83b595024764926353e08596a78e40c57ac58c568662e5e88df95&lt;/p&gt;&lt;/li&gt;
94
+ &lt;/ul&gt; </description>
95
+ <pubDate>Tue, 28 Oct 2008 19:45:27 GMT</pubDate>
96
+ <guid>http://www.ruby-lang.org/en/news/2008/10/28/ruby-1-9-1-preview-1-released/</guid>
97
+ <link>http://www.ruby-lang.org/en/news/2008/10/28/ruby-1-9-1-preview-1-released/</link>
98
+ </item>
99
+
100
+ <item>
101
+ <title>RubyConf 2008 is Sold-out</title>
102
+ <description>&lt;p&gt;&lt;a href=&quot;http://rubyconf.org/&quot;&gt;RubyConf 2008&lt;/a&gt; is sold out&lt;/p&gt;
103
+
104
+
105
+ &lt;p&gt;However, there is a &lt;a href=&quot;http://www.regonline.com/builder/site/Default.aspx?eventid=636797&quot;&gt;waiting list&lt;/a&gt; you can join in case of cancellations.&lt;/p&gt; </description>
106
+ <pubDate>Thu, 02 Oct 2008 23:21:06 GMT</pubDate>
107
+ <guid>http://www.ruby-lang.org/en/news/2008/10/02/rubyconf-2008-is-sold-out/</guid>
108
+ <link>http://www.ruby-lang.org/en/news/2008/10/02/rubyconf-2008-is-sold-out/</link>
109
+ </item>
110
+
111
+ <item>
112
+ <title>Voices That Matter 2008</title>
113
+ <description>&lt;p&gt;Pearson Education is running a &lt;a href=&quot;http://www.voicesthatmatter.com/ruby2008/&quot;&gt;Voices That Matter&lt;/a&gt; Ruby conference this fall in Boston. The conference, from the same people who Addison-Wesley's Professional Ruby Series, will give you a chance to meet and learn from those very same authors. Don't miss a chance to interact with so many Ruby professionals.&lt;/p&gt; </description>
114
+ <pubDate>Tue, 09 Sep 2008 02:49:37 GMT</pubDate>
115
+ <guid>http://www.ruby-lang.org/en/news/2008/09/09/voices-that-matter-2008/</guid>
116
+ <link>http://www.ruby-lang.org/en/news/2008/09/09/voices-that-matter-2008/</link>
117
+ </item>
118
+
119
+ <item>
120
+ <title>DoS vulnerability in REXML</title>
121
+ <description>&lt;p&gt;There is a DoS vulnerability in the REXML library included in the Ruby
122
+ Standard Library. A so-called &quot;XML entity explosion&quot; attack technique
123
+ can be used for remotely bringing down (disabling) any application
124
+ which parses user-provided XML using REXML.&lt;/p&gt;&lt;p&gt;Most Rails applications will be vulnerable because Rails parses
125
+ user-provided XML using REXML by default. &lt;/p&gt; &lt;h2&gt;&lt;a name=&quot;label-0&quot; id=&quot;label-0&quot;&gt;Impact&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Impact&quot; --&gt;&lt;p&gt;An attacker can cause a denial of service by causing REXML to parse a
126
+ document containing recursively nested entities such as:&lt;/p&gt;&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
127
+ &amp;lt;!DOCTYPE member [
128
+ &amp;lt;!ENTITY a &quot;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&amp;amp;b;&quot;&amp;gt;
129
+ &amp;lt;!ENTITY b &quot;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&amp;amp;c;&quot;&amp;gt;
130
+ &amp;lt;!ENTITY c &quot;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&amp;amp;d;&quot;&amp;gt;
131
+ &amp;lt;!ENTITY d &quot;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&amp;amp;e;&quot;&amp;gt;
132
+ &amp;lt;!ENTITY e &quot;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&amp;amp;f;&quot;&amp;gt;
133
+ &amp;lt;!ENTITY f &quot;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&amp;amp;g;&quot;&amp;gt;
134
+ &amp;lt;!ENTITY g &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;&amp;gt;
135
+ ]&amp;gt;
136
+ &amp;lt;member&amp;gt;
137
+ &amp;amp;a;
138
+ &amp;lt;/member&amp;gt;&lt;/pre&gt;&lt;h2&gt;&lt;a name=&quot;label-1&quot; id=&quot;label-1&quot;&gt;Vulnerable versions&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Vulnerable versions&quot; --&gt;&lt;h3&gt;&lt;a name=&quot;label-2&quot; id=&quot;label-2&quot;&gt;1.8 series&lt;/a&gt;&lt;/h3&gt;&lt;!-- RDLabel: &quot;1.8 series&quot; --&gt;&lt;ul&gt;
139
+ &lt;li&gt;1.8.6-p287 and all prior versions&lt;/li&gt;
140
+ &lt;li&gt;1.8.7-p72 and all prior versions&lt;/li&gt;
141
+ &lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;label-3&quot; id=&quot;label-3&quot;&gt;1.9 series&lt;/a&gt;&lt;/h3&gt;&lt;!-- RDLabel: &quot;1.9 series&quot; --&gt;&lt;ul&gt;
142
+ &lt;li&gt;all versions&lt;/li&gt;
143
+ &lt;/ul&gt;&lt;h2&gt;&lt;a name=&quot;label-4&quot; id=&quot;label-4&quot;&gt;Solution&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Solution&quot; --&gt;&lt;p&gt;Please download the following monkey patch to fix this problem.&lt;/p&gt;&lt;ul&gt;
144
+ &lt;li&gt;&lt;a href=&quot;http://www.ruby-lang.org/security/20080823rexml/rexml-expansion-fix2.rb&quot;&gt;&amp;lt;URL:http://www.ruby-lang.org/security/20080823rexml/rexml-expansion-fix2.rb&amp;gt;&lt;/a&gt;&lt;/li&gt;
145
+ &lt;/ul&gt;&lt;p&gt;Then fix your application to load rexml-expansion-fix2.rb before using
146
+ REXML.&lt;/p&gt;&lt;pre&gt;require &quot;rexml-expansion-fix2&quot;
147
+ ...
148
+ doc = REXML::Document.new(str)
149
+ ...&lt;/pre&gt;&lt;p&gt;If you have a Rails application, copy rexml-expansion-fix2.rb into a
150
+ directory on the load path (such as RAILS_ROOT/lib/), and put the
151
+ following line into config/environment.rb.&lt;/p&gt;&lt;pre&gt;require &quot;rexml-expansion-fix2&quot;&lt;/pre&gt;&lt;p&gt;If your application is Rails 2.1 or later, you can simply copy
152
+ rexml-expansion-fix2.rb to RAILS_ROOT/config/initializers and it will
153
+ be required automatically.&lt;/p&gt;&lt;p&gt;By default, XML entity expansion limit is 10000. You can change it by
154
+ changing REXML::Document.entity_expansion_limit. e.g.&lt;/p&gt;&lt;pre&gt;REXML::Document.entity_expansion_limit = 1000&lt;/pre&gt;&lt;p&gt;This fix will be made available as a gem and used by future versions of
155
+ rails, but users should take corrective action immediately.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-5&quot; id=&quot;label-5&quot;&gt;Credit&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Credit&quot; --&gt;&lt;p&gt;Credit to Luka Treiber and Mitja Kolsek of ACROS Security for
156
+ disclosing the problem to Ruby and Rails Security Teams.&lt;/p&gt;&lt;p&gt;Credit to Michael Koziarski of Rails Core Team for creating the monkey
157
+ patch to fix the vulnerability.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-6&quot; id=&quot;label-6&quot;&gt;Changes&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Changes&quot; --&gt;&lt;ul&gt;
158
+ &lt;li&gt;2008-08-29 18:46 +09:00 fixed the summary not to mislead that this vulnerability is Rails specific.&lt;/li&gt;
159
+ &lt;li&gt;2008-11-09 12:40 +09:00 fixed &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535&quot;&gt;a bug of the monkey patch&lt;/a&gt;.&lt;/li&gt;
160
+ &lt;/ul&gt;</description>
161
+ <pubDate>Sat, 23 Aug 2008 07:56:11 GMT</pubDate>
162
+ <guid>http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/</guid>
163
+ <link>http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/</link>
164
+ </item>
165
+
166
+ <item>
167
+ <title>Ruby 1.8.7-p72 and 1.8.6-p287 released</title>
168
+ <description>&lt;p&gt;Ruby 1.8.7-p72 and 1.8.6-p287 have been released.
169
+ The last releases were incomplete, and the new releases include fixes of &lt;a href=&quot;http://www.ruby-lang.org/en/news/2008/08/08/multiple-vulnerabilities-in-ruby/#label-3&quot;&gt;the previously announced vulnerability of dl&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The released source archives are available at:&lt;/p&gt;&lt;ul&gt;
170
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.gz&amp;gt;&lt;/a&gt;&lt;/li&gt;
171
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.bz2&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.bz2&amp;gt;&lt;/a&gt;&lt;/li&gt;
172
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.zip&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.zip&amp;gt;&lt;/a&gt;&lt;/li&gt;
173
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz&amp;gt;&lt;/a&gt;&lt;/li&gt;
174
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.bz2&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.bz2&amp;gt;&lt;/a&gt;&lt;/li&gt;
175
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.zip&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.zip&amp;gt;&lt;/a&gt;&lt;/li&gt;
176
+ &lt;/ul&gt; &lt;p&gt;Checksums:&lt;/p&gt;&lt;pre&gt;MD5(ruby-1.8.6-p287.tar.gz)= f6cd51001534ced5375339707a757556
177
+ SHA256(ruby-1.8.6-p287.tar.gz)= 6463d1932c34ff72b79174ac7d2c28940d29d147928250928a00a0dbee43db57
178
+ SIZE(ruby-1.8.6-p287.tar.gz)= 4590393
179
+
180
+ MD5(ruby-1.8.6-p287.tar.bz2)= 80b5f3db12531d36e6c81fac6d05dda9
181
+ SHA256(ruby-1.8.6-p287.tar.bz2)= ac15a1cb78c50ec9cc7e831616a143586bdd566bc865c6b769a0c47b3b3936ce
182
+ SIZE(ruby-1.8.6-p287.tar.bz2)= 3956902
183
+
184
+ MD5(ruby-1.8.6-p287.zip)= e555d51f5b387fdd52ae53d9bafa13f5
185
+ SHA256(ruby-1.8.6-p287.zip)= 844c66c015565839531a34b83e0526cd4fa2a71cc0f5cc8ddb0d4c158403543a
186
+ SIZE(ruby-1.8.6-p287.zip)= 5606238
187
+
188
+ MD5(ruby-1.8.7-p72.tar.gz)= 5e5b7189674b3a7f69401284f6a7a36d
189
+ SHA256(ruby-1.8.7-p72.tar.gz)= e15ca005076f5d6f91fc856fdfbd071698a4cadac3c6e25855899dba1f6fc5ef
190
+ SIZE(ruby-1.8.7-p72.tar.gz)= 4805594
191
+
192
+ MD5(ruby-1.8.7-p72.tar.bz2)= 0b215c46b89b28d7ab8d56d96e72d5b9
193
+ SHA256(ruby-1.8.7-p72.tar.bz2)= a8f8a28e286dd76747d8e97ea5cfe7a315eb896906ab8c8606d687d9f6f6146e
194
+ SIZE(ruby-1.8.7-p72.tar.bz2)= 4127450
195
+
196
+ MD5(ruby-1.8.7-p72.zip)= b44fe5a12d4bf138ba0d3660e13a8216
197
+ SHA256(ruby-1.8.7-p72.zip)= 77e67be4aa8c3e041e1d20d24e5fcf2e33ad9bccb3da3332b6c0a5b648334903
198
+ SIZE(ruby-1.8.7-p72.zip)= 5855902&lt;/pre&gt;&lt;p&gt;For a full list of all changes, see the bundled files named ChangeLog, which are also available at the following locations:&lt;/p&gt;&lt;ul&gt;
199
+ &lt;li&gt;&lt;a href=&quot;http://svn.ruby-lang.org/repos/ruby/tags/v1_8_6_287/ChangeLog&quot;&gt;&amp;lt;URL:http://svn.ruby-lang.org/repos/ruby/tags/v1_8_6_287/ChangeLog&amp;gt;&lt;/a&gt;&lt;/li&gt;
200
+ &lt;li&gt;&lt;a href=&quot;http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_72/ChangeLog&quot;&gt;&amp;lt;URL:http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_72/ChangeLog&amp;gt;&lt;/a&gt;&lt;/li&gt;
201
+ &lt;/ul&gt;</description>
202
+ <pubDate>Mon, 11 Aug 2008 02:01:00 GMT</pubDate>
203
+ <guid>http://www.ruby-lang.org/en/news/2008/08/11/ruby-1-8-7-p72-and-1-8-6-p287-released/</guid>
204
+ <link>http://www.ruby-lang.org/en/news/2008/08/11/ruby-1-8-7-p72-and-1-8-6-p287-released/</link>
205
+ </item>
206
+
207
+ <item>
208
+ <title>Multiple vulnerabilities in Ruby</title>
209
+ <description>&lt;p&gt;Multiple vulnerabilities have been discovered in Ruby. It's
210
+ recommended that you upgrade to the latest versions.&lt;/p&gt; &lt;h2&gt;&lt;a name=&quot;label-0&quot; id=&quot;label-0&quot;&gt;Details&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Details&quot; --&gt;&lt;p&gt;The following vulnerabilities have been discovered.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;label-1&quot; id=&quot;label-1&quot;&gt;Several vulnerabilities in safe level&lt;/a&gt;&lt;/h3&gt;&lt;!-- RDLabel: &quot;Several vulnerabilities in safe level&quot; --&gt;&lt;p&gt;Several vulnerabilities in safe level have been discovered.&lt;/p&gt;&lt;ul&gt;
211
+ &lt;li&gt;&lt;p&gt;untrace_var is permitted at safe level 4.&lt;/p&gt;
212
+ &lt;pre&gt;trace_var(:$VAR) {|val| puts &quot;$VAR = #{val}&quot; }
213
+
214
+ Thread.new do
215
+ $SAFE = 4
216
+ eval %q{
217
+ proc = untrace_var :$VAR
218
+ proc.first.call(&quot;aaa&quot;)
219
+ }
220
+ end.join&lt;/pre&gt;&lt;/li&gt;
221
+ &lt;li&gt;&lt;p&gt;$PROGRAM_NAME may be modified at safe level 4.&lt;/p&gt;
222
+ &lt;pre&gt;Thread.new do
223
+ $SAFE = 4
224
+ eval %q{$PROGRAM_NAME.replace &quot;Hello, World!&quot;}
225
+ end.join
226
+
227
+ $PROGRAM_NAME #=&amp;gt; &quot;Hello, World!&quot;&lt;/pre&gt;&lt;/li&gt;
228
+ &lt;li&gt;&lt;p&gt;Insecure methods may be called at safe level 1-3.&lt;/p&gt;
229
+ &lt;pre&gt;class Hello
230
+ def world
231
+ Thread.new do
232
+ $SAFE = 4
233
+ msg = &quot;Hello, World!&quot;
234
+ def msg.size
235
+ self.replace self*10 # replace string
236
+ 1 # return wrong size
237
+ end
238
+ msg
239
+ end.value
240
+ end
241
+ end
242
+
243
+ $SAFE = 1 # or 2, or 3
244
+ s = Hello.new.world
245
+ if s.kind_of?(String)
246
+ puts s if s.size &amp;lt; 20 # print string which size is less than 20
247
+ end&lt;/pre&gt;&lt;/li&gt;
248
+ &lt;li&gt;&lt;p&gt;Syslog operations are permitted at safe level 4.&lt;/p&gt;
249
+ &lt;pre&gt;require &quot;syslog&quot;
250
+
251
+ Syslog.open
252
+
253
+ Thread.new do
254
+ $SAFE = 4
255
+ eval %q{
256
+ Syslog.log(Syslog::LOG_WARNING, &quot;Hello, World!&quot;)
257
+ Syslog.mask = Syslog::LOG_UPTO(Syslog::LOG_EMERG)
258
+ Syslog.info(&quot;masked&quot;)
259
+ Syslog.close
260
+ }
261
+ end.join&lt;/pre&gt;&lt;/li&gt;
262
+ &lt;/ul&gt;&lt;p&gt;These vulnerabilities were reported by Keita Yamaguchi.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;label-2&quot; id=&quot;label-2&quot;&gt;DoS vulnerability in WEBrick&lt;/a&gt;&lt;/h3&gt;&lt;!-- RDLabel: &quot;DoS vulnerability in WEBrick&quot; --&gt;&lt;p&gt;WEBrick::HTTP::DefaultFileHandler is faulty of exponential time taking
263
+ requests due to a backtracking regular expression in
264
+ WEBrick::HTTPUtils.split_header_value.&lt;/p&gt;&lt;p&gt;Exploitable server:&lt;/p&gt;&lt;pre&gt;require 'webrick'
265
+ WEBrick::HTTPServer.new(:Port =&amp;gt; 2000, :DocumentRoot =&amp;gt; &quot;/etc&quot;).start&lt;/pre&gt;&lt;p&gt;Attack:&lt;/p&gt;&lt;pre&gt;require 'net/http'
266
+ res = Net::HTTP.start(&quot;localhost&quot;, 2000) { |http|
267
+ req = Net::HTTP::Get.new(&quot;/passwd&quot;)
268
+ req['If-None-Match'] = %q{meh=&quot;&quot;} + %q{foo=&quot;bar&quot; } * 100
269
+ http.request(req)
270
+ }
271
+ p res&lt;/pre&gt;&lt;p&gt;The request likely won't finish in this universe.&lt;/p&gt;&lt;p&gt;This vulnerability was reported by Christian Neukirchen.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;label-3&quot; id=&quot;label-3&quot;&gt;Lack of taintness check in dl&lt;/a&gt;&lt;/h3&gt;&lt;!-- RDLabel: &quot;Lack of taintness check in dl&quot; --&gt;&lt;p&gt;dl doesn't check taintness, so it could allow attackers to call
272
+ dangerous functions.&lt;/p&gt;&lt;pre&gt;require 'dl'
273
+ $SAFE = 1
274
+ h = DL.dlopen(nil)
275
+ sys = h.sym('system', 'IP')
276
+ uname = 'uname -rs'.taint
277
+ sys[uname]&lt;/pre&gt;&lt;p&gt;This vulnerability was reported by sheepman.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;label-4&quot; id=&quot;label-4&quot;&gt;DNS spoofing vulnerability in resolv.rb&lt;/a&gt;&lt;/h3&gt;&lt;!-- RDLabel: &quot;DNS spoofing vulnerability in resolv.rb&quot; --&gt;&lt;p&gt;resolv.rb allow remote attackers to spoof DNS answers. This risk can be
278
+ reduced by randomness of DNS transaction IDs and source ports, so resolv.rb
279
+ is fixed to randomize them.&lt;/p&gt;&lt;ul&gt;
280
+ &lt;li&gt;see also: &lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1447&quot;&gt;CVE-2008-1447&lt;/a&gt;&lt;/li&gt;
281
+ &lt;/ul&gt;&lt;p&gt;This vulnerability was reported by Tanaka Akira.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-5&quot; id=&quot;label-5&quot;&gt;Vulnerable versions&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Vulnerable versions&quot; --&gt;&lt;dl&gt;
282
+ &lt;dt&gt;&lt;a name=&quot;label-6&quot; id=&quot;label-6&quot;&gt;1.8 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.8 series&quot; --&gt;
283
+ &lt;dd&gt;
284
+ &lt;ul&gt;
285
+ &lt;li&gt;1.8.5 and all prior versions&lt;/li&gt;
286
+ &lt;li&gt;1.8.6-p286 and all prior versions&lt;/li&gt;
287
+ &lt;li&gt;1.8.7-p71 and all prior versions&lt;/li&gt;
288
+ &lt;/ul&gt;
289
+ &lt;/dd&gt;
290
+ &lt;dt&gt;&lt;a name=&quot;label-7&quot; id=&quot;label-7&quot;&gt;1.9 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.9 series&quot; --&gt;
291
+ &lt;dd&gt;
292
+ &lt;ul&gt;
293
+ &lt;li&gt;r18423 and all prior revisions&lt;/li&gt;
294
+ &lt;/ul&gt;
295
+ &lt;/dd&gt;
296
+ &lt;/dl&gt;&lt;h2&gt;&lt;a name=&quot;label-8&quot; id=&quot;label-8&quot;&gt;Solution&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Solution&quot; --&gt;&lt;dl&gt;
297
+ &lt;dt&gt;&lt;a name=&quot;label-9&quot; id=&quot;label-9&quot;&gt;1.8 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.8 series&quot; --&gt;
298
+ &lt;dd&gt;
299
+ Please upgrade to 1.8.6-p287, or 1.8.7-p72.
300
+ &lt;ul&gt;
301
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.tar.gz&amp;gt;&lt;/a&gt;&lt;/li&gt;
302
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz&amp;gt;&lt;/a&gt;&lt;/li&gt;
303
+ &lt;/ul&gt;
304
+ &lt;/dd&gt;
305
+ &lt;dt&gt;&lt;a name=&quot;label-10&quot; id=&quot;label-10&quot;&gt;1.9 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.9 series&quot; --&gt;
306
+ &lt;dd&gt;
307
+ &lt;p&gt;Please check out the latest version using Subversion.&lt;/p&gt;
308
+ &lt;pre&gt;$ svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby&lt;/pre&gt;
309
+ &lt;/dd&gt;
310
+ &lt;/dl&gt;&lt;p&gt;Please note that a package that corrects this weakness may already be
311
+ available through your package management software.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-11&quot; id=&quot;label-11&quot;&gt;Credit&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Credit&quot; --&gt;&lt;p&gt;Credit to Keita Yamaguchi, Christian Neukirchen, sheepman, and Tanaka
312
+ Akira for disclosing these problems to Ruby Security Team.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-12&quot; id=&quot;label-12&quot;&gt;Changes&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Changes&quot; --&gt;&lt;ul&gt;
313
+ &lt;li&gt;2008-08-08 12:21 +09:00 fixed the revision number of ruby 1.9.&lt;/li&gt;
314
+ &lt;li&gt;2008-08-11 11:23 +09:00 fixed the patchlevel of ruby 1.8. see &lt;a href=&quot;http://www.ruby-lang.org/en/news/2008/08/11/ruby-1-8-7-p72-and-1-8-6-p287-released/&quot;&gt;the release announcement of Ruby 1.8.7-p72 and 1.8.6-p287&lt;/a&gt;&lt;/li&gt;
315
+ &lt;/ul&gt;</description>
316
+ <pubDate>Fri, 08 Aug 2008 02:59:49 GMT</pubDate>
317
+ <guid>http://www.ruby-lang.org/en/news/2008/08/08/multiple-vulnerabilities-in-ruby/</guid>
318
+ <link>http://www.ruby-lang.org/en/news/2008/08/08/multiple-vulnerabilities-in-ruby/</link>
319
+ </item>
320
+
321
+ <item>
322
+ <title>RubyConf 2008 Proposals Now Being Accepted</title>
323
+ <description>&lt;p&gt;&lt;a href=&quot;http://www.rubyconf.org&quot;&gt;RubyConf 2008&lt;/a&gt; will be held in Orlando, Florida, &lt;span class=&quot;caps&quot;&gt;USA&lt;/span&gt;, from November 6 to November 8.&lt;/p&gt;
324
+
325
+
326
+ &lt;p&gt;&lt;a href=&quot;http://www.rubyconf.org/proposals/new&quot;&gt;Proposals for presentations&lt;/a&gt; are now begin accepted. All proposals must be received by August 21.&lt;/p&gt; </description>
327
+ <pubDate>Mon, 04 Aug 2008 20:26:29 GMT</pubDate>
328
+ <guid>http://www.ruby-lang.org/en/news/2008/08/04/rubyconf-2008-proposals-now-being-accepted/</guid>
329
+ <link>http://www.ruby-lang.org/en/news/2008/08/04/rubyconf-2008-proposals-now-being-accepted/</link>
330
+ </item>
331
+
332
+ <item>
333
+ <title>Arbitrary code execution vulnerabilities</title>
334
+ <description>&lt;p&gt;Multiple vulnerabilities in Ruby may lead to a denial of service (DoS)
335
+ condition or allow execution of arbitrary code.&lt;/p&gt; &lt;h2&gt;&lt;a name=&quot;label-0&quot; id=&quot;label-0&quot;&gt;Impact&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Impact&quot; --&gt;&lt;p&gt;With the following vulnerabilities, an attacker can lead to denial of
336
+ service condition or execute arbitrary code.&lt;/p&gt;&lt;ul&gt;
337
+ &lt;li&gt;&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2662&quot;&gt;CVE-2008-2662&lt;/a&gt;&lt;/li&gt;
338
+ &lt;li&gt;&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2663&quot;&gt;CVE-2008-2663&lt;/a&gt;&lt;/li&gt;
339
+ &lt;li&gt;&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2725&quot;&gt;CVE-2008-2725&lt;/a&gt;&lt;/li&gt;
340
+ &lt;li&gt;&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2726&quot;&gt;CVE-2008-2726&lt;/a&gt;&lt;/li&gt;
341
+ &lt;li&gt;&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2664&quot;&gt;CVE-2008-2664&lt;/a&gt;&lt;/li&gt;
342
+ &lt;/ul&gt;&lt;h2&gt;&lt;a name=&quot;label-1&quot; id=&quot;label-1&quot;&gt;Vulnerable versions&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Vulnerable versions&quot; --&gt;&lt;dl&gt;
343
+ &lt;dt&gt;&lt;a name=&quot;label-2&quot; id=&quot;label-2&quot;&gt;1.8 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.8 series&quot; --&gt;
344
+ &lt;dd&gt;
345
+ &lt;ul&gt;
346
+ &lt;li&gt;1.8.4 and all prior versions&lt;/li&gt;
347
+ &lt;li&gt;1.8.5-p230 and all prior versions&lt;/li&gt;
348
+ &lt;li&gt;1.8.6-p229 and all prior versions&lt;/li&gt;
349
+ &lt;li&gt;1.8.7-p21 and all prior versions&lt;/li&gt;
350
+ &lt;/ul&gt;
351
+ &lt;/dd&gt;
352
+ &lt;dt&gt;&lt;a name=&quot;label-3&quot; id=&quot;label-3&quot;&gt;1.9 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.9 series&quot; --&gt;
353
+ &lt;dd&gt;
354
+ &lt;ul&gt;
355
+ &lt;li&gt;1.9.0-1 and all prior versions&lt;/li&gt;
356
+ &lt;/ul&gt;
357
+ &lt;/dd&gt;
358
+ &lt;/dl&gt;&lt;h2&gt;&lt;a name=&quot;label-4&quot; id=&quot;label-4&quot;&gt;Solution&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Solution&quot; --&gt;&lt;dl&gt;
359
+ &lt;dt&gt;&lt;a name=&quot;label-5&quot; id=&quot;label-5&quot;&gt;1.8 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.8 series&quot; --&gt;
360
+ &lt;dd&gt;
361
+ Please upgrade to 1.8.5-p231, or 1.8.6-p230, or 1.8.7-p22.
362
+ &lt;ul&gt;
363
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5-p231.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5-p231.tar.gz&amp;gt;&lt;/a&gt;
364
+ (md5sum: e900cf225d55414bffe878f00a85807c)&lt;/li&gt;
365
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p230.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p230.tar.gz&amp;gt;&lt;/a&gt;
366
+ (md5sum: 5e8247e39be2dc3c1a755579c340857f)&lt;/li&gt;
367
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p22.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p22.tar.gz&amp;gt;&lt;/a&gt;
368
+ (md5sum: fc3ede83a98f48d8cb6de2145f680ef2)&lt;/li&gt;
369
+ &lt;/ul&gt;
370
+ &lt;/dd&gt;
371
+ &lt;dt&gt;&lt;a name=&quot;label-6&quot; id=&quot;label-6&quot;&gt;1.9 series&lt;/a&gt;&lt;/dt&gt;&lt;!-- RDLabel: &quot;1.9 series&quot; --&gt;
372
+ &lt;dd&gt;
373
+ Please upgrade to 1.9.0-2.
374
+ &lt;ul&gt;
375
+ &lt;li&gt;&lt;a href=&quot;ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-2.tar.gz&quot;&gt;&amp;lt;URL:ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-2.tar.gz&amp;gt;&lt;/a&gt;
376
+ (md5sum: 2a848b81ed1d6393b88eec8aa6173b75)&lt;/li&gt;
377
+ &lt;/ul&gt;
378
+ &lt;/dd&gt;
379
+ &lt;/dl&gt;&lt;p&gt;These versions also fix the vulnerability of WEBrick (&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1891&quot;&gt;CVE-2008-1891&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;Please note that a package that corrects this weakness may already be
380
+ available through your package management software.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-7&quot; id=&quot;label-7&quot;&gt;Credit&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Credit&quot; --&gt;&lt;p&gt;Credit to Drew Yao of Apple Product Security for disclosing the problem to Ruby
381
+ Security Team.&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;label-8&quot; id=&quot;label-8&quot;&gt;Changes&lt;/a&gt;&lt;/h2&gt;&lt;!-- RDLabel: &quot;Changes&quot; --&gt;&lt;ul&gt;
382
+ &lt;li&gt;2008-06-21 00:29 +09:00 removed wrong CVE IDs (CVE-2008-2727, CVE-2008-2728).&lt;/li&gt;
383
+ &lt;/ul&gt;</description>
384
+ <pubDate>Fri, 20 Jun 2008 12:54:43 GMT</pubDate>
385
+ <guid>http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/</guid>
386
+ <link>http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/</link>
387
+ </item>
388
+
389
+
390
+ </channel>
391
+ </rss>