Skip to content

Commit

Permalink
fix: add double quota as invalid char in file names for GCP
Browse files Browse the repository at this point in the history
  • Loading branch information
astsiapanay committed Feb 11, 2025
1 parent c49aa85 commit 7890f61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 7890f61

Please sign in to comment.