X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/18c89465564807fcbf2a0ee89ca8a018a76ca838..870e9e41e3c2b23b8b5e6730d91ea9ad1c89463d:/app/controllers/site_controller.rb?ds=inline diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 5ca5c0aab..74dbc41f5 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -92,8 +92,8 @@ class SiteController < ApplicationController @lat = note.lat @lon = note.lon @zoom = 17 - elsif params[:gpx] && @user - trace = Trace.visible_to(@user).find(params[:gpx]) + elsif params[:gpx] && current_user + trace = Trace.visible_to(current_user).find(params[:gpx]) @lat = trace.latitude @lon = trace.longitude @zoom = 16 @@ -120,9 +120,9 @@ class SiteController < ApplicationController def id append_content_security_policy_directives( - :connect_src => %w[taginfo.openstreetmap.org *.mapillary.com], - :img_src => %w[*], - :script_src => %w[dev.virtualearth.net] + :connect_src => %w[*], + :img_src => %w[* blob:], + :script_src => %w[dev.virtualearth.net 'unsafe-eval'] ) render "id", :layout => false