Skip to content

Commit ba5376d

Browse files
Sabrina Juarez GarciaBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:Issue207497' into beta
1 parent c99aa16 commit ba5376d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

java/src/main/java/com/genexus/GXDbFile.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,16 @@ private static String safeDecodeUrl(String uri) {
247247
String rawPath = u.getRawPath();
248248
if (rawPath == null)
249249
return uri;
250+
//Defensive code: Azure Blob URL scapes subdirectory slashes
251+
//https://github.com/Azure/azure-sdk-for-java/issues/21610
252+
String fixedPath = rawPath
253+
.replace("%2F", "/")
254+
.replace("%2f", "/");
250255

251-
boolean hasEncodedSegments = rawPath.matches(".*%[0-9A-Fa-f]{2}.*");
252-
if (!hasEncodedSegments) {
253-
return uri;
254-
}
255-
String decodedPath = URLDecoder.decode(rawPath, StandardCharsets.UTF_8.name());
256256
return new URI(
257257
u.getScheme(),
258258
u.getAuthority(),
259-
decodedPath,
259+
fixedPath,
260260
u.getRawQuery(),
261261
u.getRawFragment()
262262
).toString();

0 commit comments

Comments
 (0)