From f028b5162079c86cbfcea7231363f63ff8175c87 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 29 Jan 2015 13:09:35 -0500 Subject: [PATCH] Add post parameters so plugins like akismet can use it for spam prevention. --- app/controllers/posts_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 860c4c71d87..7cd44ce553b 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -420,6 +420,11 @@ class PostsController < ApplicationController result[f] = params[f] if params.has_key?(f) end + # Stuff we can use in spam prevention plugins + result[:ip_address] = request.remote_ip + result[:user_agent] = request.user_agent + result[:referrer] = request.env["HTTP_REFERER"] + result end