Skip to content

Commit

Permalink
handle new kind of auth tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
mcalmer committed Dec 7, 2024
1 parent 3966b43 commit 79e9938
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public static URI urlToFSPath(String urlString, String name, Path sccDataPath) {
}
String qPath = Arrays.stream(Optional.ofNullable(uri.getQuery()).orElse("").split("&"))
.filter(p -> p.contains("=")) // filter out possible auth tokens
.filter(p -> !(p.startsWith("__token__=") || p.startsWith("hdntl=") || p.startsWith("hdnts=")))
.map(p -> String.join(File.separator, p.split("=", 2)))
.sorted()
.collect(Collectors.joining(File.separator));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ private String buildQueryString(String query, String newKey, String newValue) {
.orElse("")
.split("&"))
.filter(p -> p.contains("=")) // filter out possible auth tokens
.filter(p -> !(p.startsWith("__token__=") || p.startsWith("hdntl=") || p.startsWith("hdnts=")))
.map(p -> {
String[] s = p.split("=", 2);
return new Tuple2<String, String>(s[0], s[1]);
Expand Down
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.mcalmer.cdn-change-project
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Handle new kind of auth tokens
- Support new official SUSE update hosts

0 comments on commit 79e9938

Please sign in to comment.