提交 7763f39a 编写于 作者: E Ernie Miller 提交者: Guillermo Iguaran

Fix for CVE-2013-0155

上级 28cfd79e
......@@ -2340,6 +2340,8 @@ def expand_hash_conditions_for_aggregates(attrs)
def sanitize_sql_hash_for_conditions(attrs, default_table_name = quoted_table_name, top_level = true)
attrs = expand_hash_conditions_for_aggregates(attrs)
return '1 = 2' if !top_level && attrs.is_a?(Hash) && attrs.empty?
conditions = attrs.map do |attr, value|
table_name = default_table_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册