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 (#375)
  • Loading branch information
Maxim-Gadalov authored and astsiapanay committed Nov 29, 2024
1 parent 7ed266c commit a5c6d6f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
Git LFS file not shown
11 changes: 9 additions & 2 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ 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'
// manually built jclouds fat jar
// base commit https://github.com/apache/jclouds/commit/5fad7fa895c02c1a8394175032a47a8bb175e84d
// cherry-pick commit https://github.com/apache/jclouds/commit/b379c17156237de96cedbb19d82bc86168fe83af
// 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class ResourceDescriptorFactory {

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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ public void testResourceWithInvalidFilename() {
() -> ResourceDescriptorFactory.fromEncoded(ResourceTypes.FILE, "bucket", "location/", "fol%0Fder1"));
assertThrows(IllegalArgumentException.class,
() -> ResourceDescriptorFactory.fromEncoded(ResourceTypes.FILE, "bucket", "location/", "//file.txt"));
assertThrows(IllegalArgumentException.class,
() -> ResourceDescriptorFactory.fromEncoded(ResourceTypes.FILE, "bucket", "location/", "folder1%22"));
}

@Test
Expand Down
11 changes: 9 additions & 2 deletions storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ dependencies {
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'org.apache.jclouds:jclouds-allblobstore:2.5.0'
implementation 'org.apache.jclouds.api:filesystem:2.5.0'
// manually built jclouds fat jar
// base commit https://github.com/apache/jclouds/commit/5fad7fa895c02c1a8394175032a47a8bb175e84d
// cherry-pick commit https://github.com/apache/jclouds/commit/b379c17156237de96cedbb19d82bc86168fe83af
// 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

0 comments on commit a5c6d6f

Please sign in to comment.