From aa4d5b3cf42db1d82163477821268dc8c844def2 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Mon, 4 Aug 2014 21:54:59 +0200 Subject: [PATCH] WW-4380 Adds additional use case to proof that the problem is solved --- .../DefaultExcludedPatternsCheckerTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java b/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java index 612552187..d9bd5bd0d 100644 --- a/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java +++ b/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java @@ -57,4 +57,21 @@ public class DefaultExcludedPatternsCheckerTest extends XWorkTestCase { } } + public void testParamWithClassInName() throws Exception { + // given + List properParams = new ArrayList(); + properParams.add("eventClass"); + properParams.add("form.eventClass"); + + ExcludedPatternsChecker checker = new DefaultExcludedPatternsChecker(); + + for (String properParam : properParams) { + // when + ExcludedPatternsChecker.IsExcluded actual = checker.isExcluded(properParam); + + // then + assertFalse("Param 'eventClass' is excluded!", actual.isExcluded()); + } + } + } \ No newline at end of file