You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by GitBox <gi...@apache.org> on 2021/01/04 16:48:17 UTC

[GitHub] [struts] sepe81 commented on a change in pull request #466: [WW-5056] Accepts dashes in param names

sepe81 commented on a change in pull request #466:
URL: https://github.com/apache/struts/pull/466#discussion_r551435370



##########
File path: core/src/test/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsCheckerTest.java
##########
@@ -97,6 +98,35 @@ public void testUnderscoreInParamName() {
         assertTrue("Param with underscore wasn't accepted!", actual.isAccepted());
     }
 
+    public void testDashInParamName() {
+        // given
+        AcceptedPatternsChecker checker = new DefaultAcceptedPatternsChecker();
+
+        // when
+        AcceptedPatternsChecker.IsAccepted actual = checker.isAccepted("mapParam['param-1']");
+
+        // then
+        assertTrue("Param with dasf wasn't accepted!", actual.isAccepted());

Review comment:
       ```suggestion
           assertTrue("Param with dash wasn't accepted!", actual.isAccepted());
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org