From b09d8f6bb3a23cd907d084103fb5b4c02479a39b Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Mon, 18 Feb 2019 15:27:23 +0900 Subject: 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. --- activemodel/lib/active_model/type/time.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activemodel') 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? -- cgit v1.2.3