1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

These lines don't help to mitigate CVE. They only turn [nil] into nil, w/o them [nil] turns into [] and that is quite innocent.

generated  SQL - `IN (NULL)`
compact! did all the job.
This commit is contained in:
Egor Homakov 2012-06-13 17:49:29 +04:00
parent 56a1bb2f10
commit e995734e7f

View file

@ -267,9 +267,6 @@ module ActionDispatch
# Remove nils from the params hash
def deep_munge(hash)
keys = hash.keys.find_all { |k| hash[k] == [nil] }
keys.each { |k| hash[k] = nil }
hash.each_value do |v|
case v
when Array