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 913247 Details for
Bug 1114425
CVE-2014-3482 rubygem-activerecord: SQL injection vulnerability in 'bitstring' quoting
[?]
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]
patch from upstream
3-2-postgres-sqli.patch (text/plain), 2.24 KB, created by
Murray McAllister
on 2014-06-30 04:49:24 UTC
(
hide
)
Description:
patch from upstream
Filename:
MIME Type:
Creator:
Murray McAllister
Created:
2014-06-30 04:49:24 UTC
Size:
2.24 KB
patch
obsolete
>From 1bf1a25b1789ec10f71a749fd038c6b3118da589 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= > <rafaelmfranca@gmail.com> >Date: Thu, 5 Jun 2014 12:34:07 -0300 >Subject: [PATCH] Check against bit string values using multiline regexp > >Fix CVE-2014-3482. >--- > .../lib/active_record/connection_adapters/postgresql_adapter.rb | 6 +++--- > activerecord/test/cases/adapters/postgresql/quoting_test.rb | 5 +++++ > 2 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb >index e98337e..3cd65d0 100644 >--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb >+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb >@@ -442,8 +442,8 @@ module ActiveRecord > when 'xml' then "xml '#{quote_string(value)}'" > when /^bit/ > case value >- when /^[01]*$/ then "B'#{value}'" # Bit-string notation >- when /^[0-9A-F]*$/i then "X'#{value}'" # Hexadecimal notation >+ when /\A[01]*\Z/ then "B'#{value}'" # Bit-string notation >+ when /\A[0-9A-F]*\Z/i then "X'#{value}'" # Hexadecimal notation > end > else > super >@@ -1160,7 +1160,7 @@ module ActiveRecord > FEATURE_NOT_SUPPORTED = "0A000" # :nodoc: > > def exec_no_cache(sql, binds) >- @connection.async_exec(sql) >+ @connection.async_exec(sql, []) > end > > def exec_cache(sql, binds) >diff --git a/activerecord/test/cases/adapters/postgresql/quoting_test.rb b/activerecord/test/cases/adapters/postgresql/quoting_test.rb >index 172055f..cfdf16d 100644 >--- a/activerecord/test/cases/adapters/postgresql/quoting_test.rb >+++ b/activerecord/test/cases/adapters/postgresql/quoting_test.rb >@@ -19,6 +19,11 @@ module ActiveRecord > assert_equal 'f', @conn.type_cast(false, nil) > assert_equal 'f', @conn.type_cast(false, c) > end >+ >+ def test_quote_bit_string >+ c = PostgreSQLColumn.new(nil, 1, 'bit') >+ assert_equal nil, @conn.quote("'); SELECT * FORM users; /*\n01\n*/--", c) >+ end > end > end > end >-- >2.0.0 >
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 1114425
: 913247