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 Jun 19, 2024
1 parent c7e646b commit b109086
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM gradle:8.2.0-jdk17-alpine as cache

WORKDIR /home/gradle/src
ENV GRADLE_USER_HOME /cache
COPY build.gradle settings.gradle ./
COPY build.gradle settings.gradle libs ./
# just pull dependencies for cache
RUN gradle --no-daemon build --stacktrace

Expand Down
11 changes: 9 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,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
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 b109086

Please sign in to comment.