diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-07 14:48:53 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-07 14:48:53 +0000 |
commit | 49403831fc90a9d0d6955bab2ae6f7833be3c0ba (patch) | |
tree | 4765bf694483851dc83b6d9dbaada5caede95a81 /activerecord/test | |
parent | 8a40c6b52258df9f790fd160104c3ab18e0494e7 (diff) | |
download | rails-49403831fc90a9d0d6955bab2ae6f7833be3c0ba.tar.gz rails-49403831fc90a9d0d6955bab2ae6f7833be3c0ba.tar.bz2 rails-49403831fc90a9d0d6955bab2ae6f7833be3c0ba.zip |
Fixed value quoting in all generated SQL statements, so that integers are not surrounded in quotes and that all sanitation are happening through the database's own quoting routine. This should hopefully make it lots easier for new adapters that doesn't accept '1' for integer columns.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@70 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/finder_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index b7b4ab589a..cc240c8acc 100755 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -68,7 +68,7 @@ class FinderTest < Test::Unit::TestCase end def test_string_sanitation - assert_equal "something '' 1=1", ActiveRecord::Base.sanitize("something ' 1=1") - assert_equal "something select table", ActiveRecord::Base.sanitize("something; select table") + assert_not_equal "'something ' 1=1'", ActiveRecord::Base.sanitize("something ' 1=1") + assert_equal "'something; select table'", ActiveRecord::Base.sanitize("something; select table") end end
\ No newline at end of file |