aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-01-08 12:11:18 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2013-01-08 12:11:18 -0800
commit88cc1688d0cb828c17706b41a8bd27870f2a2beb (patch)
tree1001415a74aa4ba81cc8fc305f4cb7a0bc145afc /activerecord/test/cases/relation
parentf049016cd348627bf8db0d72382d7580bf802a79 (diff)
parent2ced6f2f8a85957b160710ae5d9fb245a6106550 (diff)
downloadrails-88cc1688d0cb828c17706b41a8bd27870f2a2beb.tar.gz
rails-88cc1688d0cb828c17706b41a8bd27870f2a2beb.tar.bz2
rails-88cc1688d0cb828c17706b41a8bd27870f2a2beb.zip
Merge branch 'master-sec'
* master-sec: CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * dealing with empty hashes. Thanks Damien Mathieu
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r--activerecord/test/cases/relation/where_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb
index 297e865308..d1c3690478 100644
--- a/activerecord/test/cases/relation/where_test.rb
+++ b/activerecord/test/cases/relation/where_test.rb
@@ -90,6 +90,12 @@ module ActiveRecord
[[], {}, nil, ""].each do |blank|
assert_equal 4, Edge.where(blank).order("sink_id").to_a.size
end
+ def test_where_with_table_name_and_empty_array
+ assert_equal 0, Post.where(:id => []).count
+ end
+
+ def test_where_with_empty_hash_and_no_foreign_key
+ assert_equal 0, Edge.where(:sink => {}).count
end
end
end