You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by GitBox <gi...@apache.org> on 2020/07/11 18:33:16 UTC

[GitHub] [struts] lukaszlenart opened a new pull request #425: [WW-5077] DMI aware pattern

lukaszlenart opened a new pull request #425:
URL: https://github.com/apache/struts/pull/425


   Refs [WW-5077](https://issues.apache.org/jira/browse/WW-5077)


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] [struts] yasserzamani merged pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
yasserzamani merged pull request #425:
URL: https://github.com/apache/struts/pull/425


   


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] [struts] yasserzamani commented on a change in pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on a change in pull request #425:
URL: https://github.com/apache/struts/pull/425#discussion_r455190015



##########
File path: core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
##########
@@ -35,7 +37,11 @@
     private static final Logger LOG = LogManager.getLogger(DefaultAcceptedPatternsChecker.class);
 
     public static final String[] ACCEPTED_PATTERNS = {
-            "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"
+            "\\w+((\\.\\w+)|(\\[\\d+])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"

Review comment:
       Looks strange for me. Closing escaped [ brackets with not-escaped ] brackets?




----------------------------------------------------------------
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



[GitHub] [struts] lukaszlenart commented on a change in pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
lukaszlenart commented on a change in pull request #425:
URL: https://github.com/apache/struts/pull/425#discussion_r456258675



##########
File path: core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
##########
@@ -35,7 +37,11 @@
     private static final Logger LOG = LogManager.getLogger(DefaultAcceptedPatternsChecker.class);
 
     public static final String[] ACCEPTED_PATTERNS = {
-            "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"
+            "\\w+((\\.\\w+)|(\\[\\d+])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"

Review comment:
       Yes, but I would like to keep them as is, it's easier to understand what's going on. Also future changes to the patterns want affect each other.




----------------------------------------------------------------
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



[GitHub] [struts] coveralls edited a comment on pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #425:
URL: https://github.com/apache/struts/pull/425#issuecomment-657112090


   
   [![Coverage Status](https://coveralls.io/builds/32103442/badge)](https://coveralls.io/builds/32103442)
   
   Coverage increased (+0.005%) to 47.102% when pulling **3220d832d2664c786b14ad6ec0a0cb88da55783b on WW-5077-dmi-aware** into **89e02a4fb4af88304dcbb79dffe86ca205bcfa37 on struts-2-5-x**.
   


----------------------------------------------------------------
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



[GitHub] [struts] coveralls edited a comment on pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #425:
URL: https://github.com/apache/struts/pull/425#issuecomment-657112090


   
   [![Coverage Status](https://coveralls.io/builds/32136441/badge)](https://coveralls.io/builds/32136441)
   
   Coverage increased (+0.005%) to 47.102% when pulling **9b3a23eb280963474fabeb82e10e1e2f0acfe8da on WW-5077-dmi-aware** into **89e02a4fb4af88304dcbb79dffe86ca205bcfa37 on struts-2-5-x**.
   


----------------------------------------------------------------
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



[GitHub] [struts] lukaszlenart commented on a change in pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
lukaszlenart commented on a change in pull request #425:
URL: https://github.com/apache/struts/pull/425#discussion_r455519018



##########
File path: core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
##########
@@ -35,7 +37,11 @@
     private static final Logger LOG = LogManager.getLogger(DefaultAcceptedPatternsChecker.class);
 
     public static final String[] ACCEPTED_PATTERNS = {
-            "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"
+            "\\w+((\\.\\w+)|(\\[\\d+])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"

Review comment:
       It was suggested by IDEA, restored the previous version :)




----------------------------------------------------------------
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



[GitHub] [struts] yasserzamani commented on a change in pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on a change in pull request #425:
URL: https://github.com/apache/struts/pull/425#discussion_r455667021



##########
File path: core/src/main/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsChecker.java
##########
@@ -35,7 +37,11 @@
     private static final Logger LOG = LogManager.getLogger(DefaultAcceptedPatternsChecker.class);
 
     public static final String[] ACCEPTED_PATTERNS = {
-            "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"
+            "\\w+((\\.\\w+)|(\\[\\d+])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*"

Review comment:
       Ah sorry [it was right](https://stackoverflow.com/questions/43044918/why-closing-square-bracket-doesnt-require-escaping-in-java-regex).
   
   And I spotted it's nice I think to refactor `((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*` part e.g. named `EXTENSION_PATTERN` or so because it's same in both.




----------------------------------------------------------------
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



[GitHub] [struts] coveralls commented on pull request #425: [WW-5077] DMI aware pattern

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #425:
URL: https://github.com/apache/struts/pull/425#issuecomment-657112090


   
   [![Coverage Status](https://coveralls.io/builds/32009288/badge)](https://coveralls.io/builds/32009288)
   
   Coverage increased (+0.005%) to 47.102% when pulling **1b0c743e85aefd81485185f31441c6f7f6898cba on WW-5077-dmi-aware** into **89e02a4fb4af88304dcbb79dffe86ca205bcfa37 on struts-2-5-x**.
   


----------------------------------------------------------------
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