diff --git a/token-client/src/main/java/com/sap/cloud/security/xsuaa/util/UriUtil.java b/token-client/src/main/java/com/sap/cloud/security/xsuaa/util/UriUtil.java index 6d07e9b212..6b962c1b38 100644 --- a/token-client/src/main/java/com/sap/cloud/security/xsuaa/util/UriUtil.java +++ b/token-client/src/main/java/com/sap/cloud/security/xsuaa/util/UriUtil.java @@ -8,6 +8,7 @@ import javax.annotation.Nullable; import java.net.URI; import java.net.URISyntaxException; +import java.util.Objects; import java.util.Optional; public class UriUtil { @@ -67,8 +68,11 @@ private static boolean hasText(String string) { public static URI expandPath(URI baseUri, String pathToAppend) { try { String newPath = baseUri.getPath() + pathToAppend; + if(Objects.nonNull(baseUri.getQuery()) || Objects.nonNull(baseUri.getFragment())) { + logger.warn("As of version 2.8.0 queries {} and fragments {} are ignored.", baseUri.getQuery(), baseUri.getFragment()); + } return new URI(baseUri.getScheme(), baseUri.getUserInfo(), baseUri.getHost(), baseUri.getPort(), - replaceDoubleSlashes(newPath), baseUri.getQuery(), baseUri.getFragment()); + replaceDoubleSlashes(newPath), null, null); } catch (URISyntaxException e) { throw new IllegalStateException(e); }