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

Fix rescanning when only controller action changes

Basically, because the tracker caches the template names and the
rescanner was deleting the templates without clearing the cache. Should
use Tracker#reset_template instead
上级 b66d32ff
......@@ -117,7 +117,7 @@ class Brakeman::Rescanner < Brakeman::Scanner
if controller[:file] == path
tracker.templates.keys.each do |template_name|
if template_name.to_s.match /(.+)\.#{name}#/
tracker.templates.delete template_name
tracker.reset_template template_name
end
end
......@@ -222,7 +222,7 @@ class Brakeman::Rescanner < Brakeman::Scanner
#Remove templates rendered from this controller
tracker.templates.keys.each do |template_name|
if template_name.to_s.match template_matcher
tracker.templates.delete template_name
tracker.reset_template template_name
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册