Skip to content

Commit

Permalink
[#55899] revert uri join path method
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Jun 25, 2024
1 parent 4a28cce commit ef03d17
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ def error(code, log_message = nil, data = nil)
end

def join_uri_path(uri, *)
joined = File.join(uri.to_s, *)
joined.tr("\\", "/")
# We use `File.join` to ensure single `/` in between every part. This API will break if executed on a
# Windows context, as it used `\` as file separators. But we anticipate that OpenProject
# Server is not run on a Windows context.
# URI::join cannot be used, as it behaves very different for the path parts depending on trailing slashes.
File.join(uri.to_s, *)
end

def token(user:, configuration:, &)
Expand Down

0 comments on commit ef03d17

Please sign in to comment.