Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions java/src/main/java/com/genexus/GXDbFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,16 @@ private static String safeDecodeUrl(String uri) {
String rawPath = u.getRawPath();
if (rawPath == null)
return uri;
//Defensive code: Azure Blob URL scapes subdirectory slashes
//https://github.com/Azure/azure-sdk-for-java/issues/21610
String fixedPath = rawPath
.replace("%2F", "/")
.replace("%2f", "/");

boolean hasEncodedSegments = rawPath.matches(".*%[0-9A-Fa-f]{2}.*");
if (!hasEncodedSegments) {
return uri;
}
String decodedPath = URLDecoder.decode(rawPath, StandardCharsets.UTF_8.name());
return new URI(
u.getScheme(),
u.getAuthority(),
decodedPath,
fixedPath,
u.getRawQuery(),
u.getRawFragment()
).toString();
Expand Down
Loading