提交 d1d15870 编写于 作者: J Justin Collins

Fix CheckMailTo to detect the vulnerability

because it was checking the options for the wrong value
上级 492505f7
...@@ -33,13 +33,10 @@ class Brakeman::CheckMailTo < Brakeman::BaseCheck ...@@ -33,13 +33,10 @@ class Brakeman::CheckMailTo < Brakeman::BaseCheck
Brakeman.debug "Checking calls to mail_to for javascript encoding" Brakeman.debug "Checking calls to mail_to for javascript encoding"
tracker.find_call(:target => false, :method => :mail_to).each do |result| tracker.find_call(:target => false, :method => :mail_to).each do |result|
call = result[:call] result[:call].arglist.each do |arg|
args = call.args
args.each do |arg|
if hash? arg if hash? arg
if hash_access(arg, :javascript) if option = hash_access(arg, :encode)
return result return result if symbol? option and option.value == :javascript
end end
end end
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册