aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-18 15:27:23 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-02-18 16:57:10 +0900
commitb09d8f6bb3a23cd907d084103fb5b4c02479a39b (patch)
tree150e5356911c2cb1e4576a9190d1269e268f7145 /activemodel
parent4ea067017ae52d4a74335ed85df085a86663d213 (diff)
downloadrails-b09d8f6bb3a23cd907d084103fb5b4c02479a39b.tar.gz
rails-b09d8f6bb3a23cd907d084103fb5b4c02479a39b.tar.bz2
rails-b09d8f6bb3a23cd907d084103fb5b4c02479a39b.zip
Don't allow `where` with invalid value matches to nil values
That is considered as silently leaking information. If type casting doesn't return any actual value, it should not be matched to any record. Fixes #33624. Closes #33946.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/type/time.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/type/time.rb b/activemodel/lib/active_model/type/time.rb
index 16d3efb728..61847a4ce7 100644
--- a/activemodel/lib/active_model/type/time.rb
+++ b/activemodel/lib/active_model/type/time.rb
@@ -13,10 +13,6 @@ module ActiveModel
:time
end
- def serialize(value)
- super || value
- end
-
def user_input_in_time_zone(value)
return unless value.present?