File tree Expand file tree Collapse file tree
java/src/main/java/com/genexus Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments