X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/777b19c775ec0146664be9604ae6ae87d82bdb78..428e7d6baa28ecb7d06f1f851fdd69ef00249bfb:/app/controllers/site_controller.rb?ds=sidebyside diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 5d35b9979..353feecef 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -69,6 +69,13 @@ class SiteController < ApplicationController require_user end + if editor == "potlatch" || editor == "potlatch2" + append_content_security_policy_directives( + :object_src => %w(*), + :plugin_types => %w(application/x-shockwave-flash) + ) + end + if params[:node] bbox = Node.find(params[:node]).bbox.to_unscaled @lat = bbox.centre_lat @@ -84,7 +91,7 @@ class SiteController < ApplicationController @lat = note.lat @lon = note.lon @zoom = 17 - elsif params[:gpx] + elsif params[:gpx] && @user trace = Trace.visible_to(@user).find(params[:gpx]) @lat = trace.latitude @lon = trace.longitude @@ -111,6 +118,12 @@ class SiteController < ApplicationController end def id + append_content_security_policy_directives( + :connect_src => %w(taginfo.openstreetmap.org *.mapillary.com), + :img_src => %w(*), + :script_src => %w(dev.virtualearth.net) + ) + render "id", :layout => false end