OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#46491] handle NC usernames with whitespaces
Eric Schubertcae3d1600db0
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rbindex ea70dcc5386..88cea3ac198 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rb@@ -33,7 +33,7 @@ module Storages::Peripherals::StorageInteraction::Nextcloud@uri = base_uri@token = token@retry_proc = retry_proc- @base_path = File.join(@uri.path, "remote.php/dav/files", token.origin_user_id)+ @base_path = File.join(@uri.path, "remote.php/dav/files", escape_whitespace(token.origin_user_id))enddef query(parent)@@ -58,12 +58,17 @@ module Storages::Peripherals::StorageInteraction::Nextcloudprivate+ def escape_whitespace(value)+ value.gsub(' ', '%20')+ end+def requested_folder(folder)return '' if folder.nil?- folder.gsub(' ', '%20')+ escape_whitespace(folder)end+ # rubocop:disable Metrics/AbcSizedef requested_propertiesNokogiri::XML::Builder.new do |xml|xml['d'].propfind(@@ -81,6 +86,7 @@ module Storages::Peripherals::StorageInteraction::Nextcloudendend.to_xmlend+ # rubocop:enable Metrics/AbcSizedef error(response)case response