Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 863439 Details for
Bug 1065538
CVE-2014-0082 rubygem-actionpack: Action View string handling denial of service
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
3-0-render_text_dos.patch
3-0-render_text_dos.patch (text/plain), 1.88 KB, created by
Kurt Seifried
on 2014-02-14 21:42:15 UTC
(
hide
)
Description:
3-0-render_text_dos.patch
Filename:
MIME Type:
Creator:
Kurt Seifried
Created:
2014-02-14 21:42:15 UTC
Size:
1.88 KB
patch
obsolete
>From 78a465dd70ee8968ca4538820f45c049b3ea009f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= > <rafaelmfranca@gmail.com> >Date: Tue, 11 Feb 2014 23:12:15 -0200 >Subject: [PATCH] Use the reference for the mime type to get the format > >Before we were calling to_sym in the mime type, even when it is unknown >what can cause denial of service since symbols are not removed by the >garbage collector. >--- > actionpack/lib/action_view/template/text.rb | 2 +- > actionpack/test/template/text_test.rb | 17 +++++++++++++++++ > 2 files changed, 18 insertions(+), 1 deletion(-) > create mode 100644 actionpack/test/template/text_test.rb > >diff --git a/actionpack/lib/action_view/template/text.rb b/actionpack/lib/action_view/template/text.rb >index 51be831..12c9ed9 100644 >--- a/actionpack/lib/action_view/template/text.rb >+++ b/actionpack/lib/action_view/template/text.rb >@@ -23,7 +23,7 @@ module ActionView #:nodoc: > end > > def formats >- [@mime_type.to_sym] >+ [@mime_type.respond_to?(:ref) ? @mime_type.ref : @mime_type.to_s] > end > > def partial? >diff --git a/actionpack/test/template/text_test.rb b/actionpack/test/template/text_test.rb >new file mode 100644 >index 0000000..d899d54 >--- /dev/null >+++ b/actionpack/test/template/text_test.rb >@@ -0,0 +1,17 @@ >+require 'abstract_unit' >+ >+class TextTest < ActiveSupport::TestCase >+ test 'formats returns symbol for recognized MIME type' do >+ assert_equal [:text], ActionView::Template::Text.new('', :text).formats >+ end >+ >+ test 'formats returns string for recognized MIME type when MIME does not have symbol' do >+ foo = Mime::Type.lookup("foo") >+ assert_nil foo.to_sym >+ assert_equal ['foo'], ActionView::Template::Text.new('', foo).formats >+ end >+ >+ test 'formats returns string for unknown MIME type' do >+ assert_equal ['foo'], ActionView::Template::Text.new('', 'foo').formats >+ end >+end >-- >1.8.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1065538
: 863439 |
863440
|
863441