diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-01 23:15:03 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-01 23:15:03 +0000 |
commit | ed7091cda1427f2fdd29491b8c54ad1dca416e06 (patch) | |
tree | 0b7097f940ba7e41788818ed01f292435e5f4f30 /app/controllers/issue_categories_controller.rb | |
parent | 8632efcce2b432ce8b4e55c9d9563cd37c15eb2e (diff) | |
download | redmine-ed7091cda1427f2fdd29491b8c54ad1dca416e06.tar.gz redmine-ed7091cda1427f2fdd29491b8c54ad1dca416e06.zip |
Fix potential Execution After Redirect bugs.
Execution After Redirect (EAR) happens when redirect in a controller is
triggered but there still is code that is executed in the action.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5611 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issue_categories_controller.rb')
-rw-r--r-- | app/controllers/issue_categories_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index a43a767bb..049ef07f3 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -65,10 +65,12 @@ class IssueCategoriesController < ApplicationController # No issue assigned to this category @category.destroy redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' + return elsif params[:todo] reassign_to = @project.issue_categories.find_by_id(params[:reassign_to_id]) if params[:todo] == 'reassign' @category.destroy(reassign_to) redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' + return end @categories = @project.issue_categories - [@category] end |