X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/16a7c3c0b0bff303a6185282ab170fd495f7413d..4aa8d709fe8483c295a6d16dadffb5b11848e5b8:/apps/workbench/app/controllers/collections_controller.rb diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb index 10e026ae6c..680c324f5c 100644 --- a/apps/workbench/app/controllers/collections_controller.rb +++ b/apps/workbench/app/controllers/collections_controller.rb @@ -343,7 +343,7 @@ class CollectionsController < ApplicationController # Prefer the attachment-only-host when we want an attachment # (and when there is no preview link configured) tmpl = Rails.configuration.Services.WebDAVDownload.ExternalURL.to_s - elsif not Rails.configuration.Workbench.TrustAllContent + elsif not Rails.configuration.Collections.TrustAllContent check_uri = URI.parse(tmpl.sub("*", munged_id)) if opts[:query_token] and (check_uri.host.nil? or ( @@ -376,7 +376,7 @@ class CollectionsController < ApplicationController uri.path += 't=' + opts[:path_token] + '/' end uri.path += '_/' - uri.path += URI.escape(file) if file + uri.path += ERB::Util.url_encode(file).gsub('%2F', '/') if file query = Hash[URI.decode_www_form(uri.query || '')] { query_token: 'api_token',