Skip to content

Commit

Permalink
fix: patch jclouds 2.5.0 with important fix for google-cloud-storage;…
Browse files Browse the repository at this point in the history
… forbid double quotes in resource name
  • Loading branch information
Maxim-Gadalov committed Jun 18, 2024
1 parent c7e646b commit 51ff3a3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'com.auth0:java-jwt:4.4.0'
implementation 'com.auth0:jwks-rsa:0.22.1'
implementation 'org.apache.jclouds:jclouds-allblobstore:2.5.0'
implementation 'org.apache.jclouds.api:filesystem:2.5.0'
// fat jar of https://github.com/Maxim-Gadalov/jclouds/tree/2.5.0-gcp-fix
// this version includes important google-cloud-storage fix that is not released yet
implementation files("libs/jclouds-allblobstore-2.5.0-SNAPSHOT-jar-with-dependencies.jar")
implementation ('org.apache.jclouds.api:filesystem:2.5.0') {
exclude group: 'org.apache.jclouds', module: 'jclouds-blobstore'
exclude group: 'org.apache.jclouds', module: 'jclouds-core'
}
implementation 'org.redisson:redisson:3.27.0'
implementation group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.12.663'
implementation group: 'com.amazonaws', name: 'aws-java-sdk-sts', version: '1.12.663'
Expand Down
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class ResourceDescription {

private static final Set<Character> INVALID_FILE_NAME_CHARS = Set.of('/', '{', '}');
private static final Set<Character> INVALID_FILE_NAME_CHARS = Set.of('/', '{', '}', '"');
private static final int MAX_PATH_SIZE = 900;

ResourceType type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ public void testResourceWithInvalidFilename() {
() -> ResourceDescription.fromEncoded(ResourceType.FILE, "bucket", "location/", "%1Ffolder1/file"));
assertThrows(IllegalArgumentException.class,
() -> ResourceDescription.fromEncoded(ResourceType.FILE, "bucket", "location/", "fol%0Fder1"));
assertThrows(IllegalArgumentException.class,
() -> ResourceDescription.fromEncoded(ResourceType.FILE, "bucket", "location/", "folder1%22"));
}

@Test
Expand Down

0 comments on commit 51ff3a3

Please sign in to comment.