Trying to fix comment attack

This commit is contained in:
yafeilee 2016-08-12 14:18:28 +08:00
parent 22ca31bbb5
commit 6f29e536d7
1 changed files with 2 additions and 1 deletions

View File

@ -9,8 +9,9 @@ class CommentsController < ApplicationController
def create
unless request.xhr?
logger.warn "attack action detected: #{params}"
logger.warn "attack action detected: #{params.to_h}"
redirect_to root_path
return
end
cookies[:name] = comment_params[:name]
cookies[:email] = comment_params[:email]