Trying to fix comment attack
This commit is contained in:
parent
22ca31bbb5
commit
6f29e536d7
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue