aboutsummaryrefslogtreecommitdiffstats
path: root/security-utils/src/test
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2018-11-26 15:37:53 +0100
committerBjørn Christian Seime <bjorncs@oath.com>2018-11-26 15:40:20 +0100
commit5a752f667d9b517c0bdcf6cc4d343ba377c7009f (patch)
tree03c266f7cb8cab4b0c81e0263a0a8f06d1ad494c /security-utils/src/test
parent5fda15658e85d4c0bf7c52e9afa07a6aae072c25 (diff)
Escape '!' which is also a regex meta character
Diffstat (limited to 'security-utils/src/test')
-rw-r--r--security-utils/src/test/java/com/yahoo/security/tls/policy/HostGlobPatternTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/security-utils/src/test/java/com/yahoo/security/tls/policy/HostGlobPatternTest.java b/security-utils/src/test/java/com/yahoo/security/tls/policy/HostGlobPatternTest.java
index d03ca14a728..ebec5605621 100644
--- a/security-utils/src/test/java/com/yahoo/security/tls/policy/HostGlobPatternTest.java
+++ b/security-utils/src/test/java/com/yahoo/security/tls/policy/HostGlobPatternTest.java
@@ -59,11 +59,11 @@ public class HostGlobPatternTest {
}
@Test
- public void regex_special_characters_are_matched_as_literal_characters() {
- assertTrue(globMatches("\\.[]{}()<>+-=^$|", "\\.[]{}()<>+-=^$|"));
+ public void other_regex_meta_characters_are_matched_as_literal_characters() {
+ assertTrue(globMatches("<([{\\^-=$!|]})+.>", "<([{\\^-=$!|]})+.>"));
}
private static boolean globMatches(String pattern, String value) {
return new HostGlobPattern(pattern).matches(value);
}
-} \ No newline at end of file
+}