我在Rails应用上运行了一个静态代码分析工具(brakeman),它报告了一些我怀疑可能是误报的SQL注入漏洞。违规的线条看起来像这样: #things_controller.rb
def index
Thing.select(params[:columns]).where(params[:conditions])
end
我想不通的方式来利用这一点,但它似乎相当开放式的,这
我最近添加的司闸员宝石我的Gemfile,不得不看,我应该用 :only_path => true
,使之更加安全。但我使用嵌套的资源,不知道如何,这里是我的控制器的一部分。 if @comment.update_attributes(params[:comment])
redirect_to [@message, @comment], notice: 'Comment was su