summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Morsi <mmorsi@redhat.com>2010-09-08 14:03:45 -0400
committerMohammed Morsi <mmorsi@redhat.com>2010-09-08 14:03:45 -0400
commit611b284cb95c54f4668dca1d31ff55552fec5fc3 (patch)
tree75173822e14aaa1ec356c99a99a3fe9c88ab43cd
parentb8007954bad5df50e3505cca6794203c8cd5a526 (diff)
downloadrubygem-activerecord-611b284cb95c54f4668dca1d31ff55552fec5fc3.tar.gz
rubygem-activerecord-611b284cb95c54f4668dca1d31ff55552fec5fc3.tar.xz
rubygem-activerecord-611b284cb95c54f4668dca1d31ff55552fec5fc3.zip
updated activerecord postgres fix
-rw-r--r--.gitignore1
-rw-r--r--activerecord-2.3.8-postgres-fix.patch15
-rw-r--r--rubygem-activerecord.spec5
3 files changed, 11 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 1d4f9f7..5f8525c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
activerecord-2.3.5.gem
activerecord-2.3.8.gem
+/activerecord-2.3.8.gem
diff --git a/activerecord-2.3.8-postgres-fix.patch b/activerecord-2.3.8-postgres-fix.patch
index 9b300b4..3dbaee2 100644
--- a/activerecord-2.3.8-postgres-fix.patch
+++ b/activerecord-2.3.8-postgres-fix.patch
@@ -1,15 +1,12 @@
---- activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb.orig 2010-08-16 21:14:25.710395992 -0400
-+++ activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb 2010-08-16 21:15:33.091702801 -0400
-@@ -407,7 +407,11 @@ module ActiveRecord
+--- activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb.orig 2010-09-08 13:41:46.000000000 -0400
++++ activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb 2010-09-08 13:42:39.000000000 -0400
+@@ -407,6 +407,9 @@ module ActiveRecord
# Quotes column names for use in SQL queries.
def quote_column_name(name) #:nodoc:
-- PGconn.quote_ident(name.to_s)
-+ if PGconn.respond_to?(:quote_ident)
-+ PGconn.quote_ident(name.to_s)
-+ else
-+ %("#{name}")
++ unless PGconn.respond_to?(:quote_ident)
++ raise 'Your PostgreSQL connection does not support quote_ident. Try upgrading pg.'
+ end
+ PGconn.quote_ident(name.to_s)
end
- # Quote date/time values for use in SQL input. Includes microseconds
diff --git a/rubygem-activerecord.spec b/rubygem-activerecord.spec
index 42a5ce9..e493fb3 100644
--- a/rubygem-activerecord.spec
+++ b/rubygem-activerecord.spec
@@ -10,7 +10,7 @@ Summary: Implements the ActiveRecord pattern for ORM
Name: rubygem-%{gemname}
Epoch: 1
Version: 2.3.8
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: Development/Languages
License: MIT
URL: http://www.rubyonrails.org
@@ -109,6 +109,9 @@ rake test_sqlite3 --trace
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%changelog
+* Wed Sep 08 2010 Mohammed Morsi <mmorsi@redhat.com> - 1:2.3.8-4
+- Updated postgres fix to resolve security issue
+
* Mon Aug 16 2010 Mohammed Morsi <mmorsi@redhat.com> - 1:2.3.8-3
- Included postgres fix (patch also pushed upstream, see rails issue tracker)