提交 6770bb95 编写于 作者: J Justin Collins

Better ignore safe methods in XSS checks

上级 ffdba206
......@@ -61,6 +61,8 @@ class Brakeman::CheckCrossSiteScripting < Brakeman::BaseCheck
out = exp.value.first_arg
end
return if call? out and ignore_call? out.target, out.method
if input = has_immediate_user_input?(out)
add_result exp
......
......@@ -42,6 +42,7 @@ class Brakeman::CheckLinkToHref < Brakeman::CheckLinkTo
#with something before the user input
return if node_type?(url_arg, :string_interp) && !url_arg[1].chomp.empty?
return if call? url_arg and ignore_call? url_arg.target, url_arg.method
if input = has_immediate_user_input?(url_arg)
message = "Unsafe #{friendly_type_of input} in link_to href"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册