]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Use rails 5 version of redirect_back.
[rails.git] / app / controllers / application_controller.rb
index 14490488507bc5775924d8c2e0f93a7daccf548f..534b37058d190e93884928a8f7402c35189d3143 100644 (file)
@@ -1,7 +1,7 @@
 class ApplicationController < ActionController::Base
   include SessionPersistence
 
-  protect_from_forgery
+  protect_from_forgery :with => :exception
 
   before_action :fetch_body
 
@@ -74,7 +74,7 @@ class ApplicationController < ActionController::Base
     if request.cookies["_osm_session"].to_s == ""
       if params[:cookie_test].nil?
         session[:cookie_test] = true
-        redirect_to Hash[params].merge(:cookie_test => "true")
+        redirect_to params.to_unsafe_h.merge(:cookie_test => "true")
         false
       else
         flash.now[:warning] = t "application.require_cookies.cookies_needed"