You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/08/04 21:55:21 UTC

git commit: WW-4380 Adds additional use case to proof that the problem is solved

Repository: struts
Updated Branches:
  refs/heads/develop 114346204 -> aa4d5b3cf


WW-4380 Adds additional use case to proof that the problem is solved


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/aa4d5b3c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/aa4d5b3c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/aa4d5b3c

Branch: refs/heads/develop
Commit: aa4d5b3cf42db1d82163477821268dc8c844def2
Parents: 1143462
Author: Lukasz Lenart <lu...@apache.org>
Authored: Mon Aug 4 21:54:59 2014 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Mon Aug 4 21:54:59 2014 +0200

----------------------------------------------------------------------
 .../DefaultExcludedPatternsCheckerTest.java        | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/aa4d5b3c/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java
----------------------------------------------------------------------
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 6125521..d9bd5bd 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<String> properParams = new ArrayList<String>();
+        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