Use explicit to_unsafe_h method when converting parameters to a hash
This commit is contained in:
parent
d85621c7ae
commit
18c8946556
2 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ class ApplicationController < ActionController::Base
|
||||||
if request.cookies["_osm_session"].to_s == ""
|
if request.cookies["_osm_session"].to_s == ""
|
||||||
if params[:cookie_test].nil?
|
if params[:cookie_test].nil?
|
||||||
session[:cookie_test] = true
|
session[:cookie_test] = true
|
||||||
redirect_to Hash[params].merge(:cookie_test => "true")
|
redirect_to params.to_unsafe_h.merge(:cookie_test => "true")
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
flash.now[:warning] = t "application.require_cookies.cookies_needed"
|
flash.now[:warning] = t "application.require_cookies.cookies_needed"
|
||||||
|
|
|
@ -50,7 +50,7 @@ class SiteController < ApplicationController
|
||||||
new_params[:anchor] = "map=#{zoom}/#{lat}/#{lon}"
|
new_params[:anchor] = "map=#{zoom}/#{lat}/#{lon}"
|
||||||
new_params[:anchor] += "&layers=#{params[:layers]}" if params.key? :layers
|
new_params[:anchor] += "&layers=#{params[:layers]}" if params.key? :layers
|
||||||
|
|
||||||
redirect_to Hash[new_params]
|
redirect_to new_params.to_unsafe_h
|
||||||
end
|
end
|
||||||
|
|
||||||
def key
|
def key
|
||||||
|
@ -158,7 +158,7 @@ class SiteController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if anchor.present?
|
if anchor.present?
|
||||||
redirect_to Hash[params].merge(:anchor => anchor.join("&"))
|
redirect_to params.to_unsafe_h.merge(:anchor => anchor.join("&"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue