Skip to content

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

[48573] Extraced escaped_username as variable

Andreas Pfohl416492aa6e0f
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb
index a5d238a3824..5a9f697c188 100644
--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb
+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb
@@ -53,17 +53,19 @@ module Storages::Peripherals::StorageInteraction::Nextcloud
def build_origin_paths
->(input) do
+ escaped_username = CGI.escapeURIComponent(@username)
+
source = Util.join_uri_path(
@uri,
"remote.php/dav/files",
- CGI.escapeURIComponent(@username),
+ escaped_username,
Util.escape_path(input[:source_path])
)
destination = Util.join_uri_path(
@uri,
"remote.php/dav/files",
- CGI.escapeURIComponent(@username),
+ escaped_username,
Util.escape_path(input[:destination_path])
)