Skip to content

Commit

Permalink
fix(artifactStore): Make applicationsRegex pattern matching case-inse…
Browse files Browse the repository at this point in the history
…nsitive (#1206)
  • Loading branch information
christosarvanitis authored Sep 26, 2024
1 parent 2f38092 commit ec51820
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public S3ArtifactStoreStorer(
this.bucket = bucket;
this.uriBuilder = uriBuilder;
this.applicationsPattern =
(applicationsRegex != null) ? Pattern.compile(applicationsRegex) : null;
(applicationsRegex != null)
? Pattern.compile(applicationsRegex, Pattern.CASE_INSENSITIVE)
: null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ private static Stream<Arguments> applicationsRegexArgs() {
Arguments.of("any", null, true),
Arguments.of("app-one", allowRegex, true),
Arguments.of("app-four", allowRegex, false),
Arguments.of("APP-One", allowRegex, true),
Arguments.of("APP-FOUR", allowRegex, false),
Arguments.of("one", allowRegex, false),
Arguments.of("app-one-more", allowRegex, false),
Arguments.of("app-five", allowRegex, true),
Expand Down

0 comments on commit ec51820

Please sign in to comment.