0
我最近添加的司閘員寶石我的Gemfile,不得不看,我應該用安全重定向到嵌套資源在Rails中
:only_path => true
,使之更加安全。但我使用嵌套的資源,不知道如何,這裏是我的控制器的一部分。
if @comment.update_attributes(params[:comment])
redirect_to [@message, @comment], notice: 'Comment was successfully updated.'
我怎樣才能做到這一點,我只看到了與url_for幫手only_path屬性。 感謝您的幫助!
這會產生一個低置信度的警告,對吧? – oreoshake
隨時加入對話https://github.com/presidentbeef/brakeman/issues/143#issuecomment-8378199 :) – oreoshake
@oreoshake:是的,低信心。無論如何,我想解決它們,以便更安全地解決安全問題。 –