]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/messages_controller.rb
Fix the Redirect warnings from Brakeman
[rails.git] / app / controllers / messages_controller.rb
index 5aa5aba709e33c2bf8f15a3e8442b928de548afc..4d054b5f2fe3f7e57a98faf595d6144a39ebcef1 100644 (file)
@@ -34,6 +34,7 @@ class MessagesController < ApplicationController
       Notifier.message_notification(@message).deliver_later
       redirect_to :action => :inbox
     else
+      @title = t "messages.new.title"
       render :action => "new"
     end
   end
@@ -119,7 +120,7 @@ class MessagesController < ApplicationController
       flash[:notice] = t ".destroyed"
 
       if params[:referer]
-        redirect_to params[:referer]
+        redirect_to safe_referer(params[:referer])
       else
         redirect_to :action => :inbox
       end