Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 831321 Details for
Bug 1036409
CVE-2013-6417 rubygem-actionpack: unsafe query generation risk (incomplete fix for CVE-2013- 0155)
[?]
New
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.rh83 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]
CVE-2013-6417-4-0-rack-params.patch
CVE-2013-6417-4-0-rack-params.patch (text/plain), 2.74 KB, created by
Kurt Seifried
on 2013-12-01 22:39:57 UTC
(
hide
)
Description:
CVE-2013-6417-4-0-rack-params.patch
Filename:
MIME Type:
Creator:
Kurt Seifried
Created:
2013-12-01 22:39:57 UTC
Size:
2.74 KB
patch
obsolete
>From 6857592b46ac5a41464734e5bc5fc070d2a265fc Mon Sep 17 00:00:00 2001 >From: Michael Koziarski <michael@koziarski.com> >Date: Sat, 30 Nov 2013 16:45:23 +1300 >Subject: [PATCH] Deep Munge the parameters for GET and POST > >The previous implementation of this functionality could be accidentally >subverted by instantiating a raw Rack::Request before the first Rails::Request >was constructed. > >Fixes CVE-2013-6417 >--- > actionpack/lib/action_dispatch/http/request.rb | 4 ++-- > .../test/dispatch/request/query_string_parsing_test.rb | 15 +++++++++++++++ > 2 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb >index ebd87c4..ba04000 100644 >--- a/actionpack/lib/action_dispatch/http/request.rb >+++ b/actionpack/lib/action_dispatch/http/request.rb >@@ -271,7 +271,7 @@ module ActionDispatch > > # Override Rack's GET method to support indifferent access > def GET >- @env["action_dispatch.request.query_parameters"] ||= (normalize_encode_params(super) || {}) >+ @env["action_dispatch.request.query_parameters"] ||= deep_munge((normalize_encode_params(super) || {})) > rescue TypeError => e > raise ActionController::BadRequest.new(:query, e) > end >@@ -279,7 +279,7 @@ module ActionDispatch > > # Override Rack's POST method to support indifferent access > def POST >- @env["action_dispatch.request.request_parameters"] ||= (normalize_encode_params(super) || {}) >+ @env["action_dispatch.request.request_parameters"] ||= deep_munge((normalize_encode_params(super) || {})) > rescue TypeError => e > raise ActionController::BadRequest.new(:request, e) > end >diff --git a/actionpack/test/dispatch/request/query_string_parsing_test.rb b/actionpack/test/dispatch/request/query_string_parsing_test.rb >index f072a9f..0ad0dbc 100644 >--- a/actionpack/test/dispatch/request/query_string_parsing_test.rb >+++ b/actionpack/test/dispatch/request/query_string_parsing_test.rb >@@ -11,6 +11,17 @@ class QueryStringParsingTest < ActionDispatch::IntegrationTest > head :ok > end > end >+ class EarlyParse >+ def initialize(app) >+ @app = app >+ end >+ >+ def call(env) >+ # Trigger a Rack parse so that env caches the query params >+ Rack::Request.new(env).params >+ @app.call(env) >+ end >+ end > > def teardown > TestController.last_query_parameters = nil >@@ -131,6 +142,10 @@ class QueryStringParsingTest < ActionDispatch::IntegrationTest > set.draw do > get ':action', :to => ::QueryStringParsingTest::TestController > end >+ @app = self.class.build_app(set) do |middleware| >+ middleware.use(EarlyParse) >+ end >+ > > get "/parse", actual > assert_response :ok >-- >1.8.3.4 >
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 1036409
:
831320
| 831321