diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-06-02 17:03:25 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-06-02 17:03:25 +0100 |
commit | be5e24bc207bc3306ccbb2104e3cf26002469b1d (patch) | |
tree | afa4fbddfcc4f37735dab72ec6f8e915f8220477 /app/controllers/request_controller.rb | |
parent | c38327f35a5203a90c9f9084c16da2700d96726a (diff) | |
parent | 21e17c404bfd4ab900045589a751c7010e223609 (diff) |
Merge branch 'issues/1448-no-error-on-spam' into rails-3-develop
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index d66c28275..125791ef8 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -303,6 +303,12 @@ class RequestController < ApplicationController return render_new_compose(batch=false) end + # Check we have :public_body_id - spammers seem to be using :public_body + # erroneously instead + if params[:info_request][:public_body_id].blank? + redirect_to frontpage_path && return + end + # See if the exact same request has already been submitted # XXX this check should theoretically be a validation rule in the # model, except we really want to pass @existing_request to the view so |