mirror of
https://github.com/github/rails.git
synced 2026-02-03 18:55:29 -05:00
Fix quote_bound_value to not map Strings #1416 [htonl]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -171,6 +171,10 @@ class FinderTest < Test::Unit::TestCase
|
||||
assert_equal %('a','b','c'), bind(':a', :a => Set.new(%w(a b c))) # '
|
||||
end
|
||||
|
||||
def test_bind_string
|
||||
assert_equal "''", bind('?', '')
|
||||
end
|
||||
|
||||
def test_string_sanitation
|
||||
assert_not_equal "'something ' 1=1'", ActiveRecord::Base.sanitize("something ' 1=1")
|
||||
assert_equal "'something; select table'", ActiveRecord::Base.sanitize("something; select table")
|
||||
|
||||
Reference in New Issue
Block a user