diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-20 20:59:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-20 20:59:52 +0000 |
commit | d1244b31a4c2c6f8a5625f92506f7e281fb1cc00 (patch) | |
tree | 9f64f514b2bb798e0cf075b101af320189682764 /app/controllers/messages_controller.rb | |
parent | 2ae7ddcb24538987c46bd406c870dcac514d2912 (diff) | |
download | redmine-d1244b31a4c2c6f8a5625f92506f7e281fb1cc00.tar.gz redmine-d1244b31a4c2c6f8a5625f92506f7e281fb1cc00.zip |
Fixed that requesting a message from an invalid forum should respond with 404 (#13232).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11446 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/messages_controller.rb')
-rw-r--r-- | app/controllers/messages_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index b29b64e34..ad9107639 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -125,7 +125,7 @@ class MessagesController < ApplicationController private def find_message - find_board + return unless find_board @message = @board.messages.find(params[:id], :include => :parent) @topic = @message.root rescue ActiveRecord::RecordNotFound @@ -137,5 +137,6 @@ private @project = @board.project rescue ActiveRecord::RecordNotFound render_404 + nil end end |