kusalk commented on code in PR #736:
URL: https://github.com/apache/struts/pull/736#discussion_r1300194447


##########
core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java:
##########
@@ -261,7 +262,8 @@ public void setDevModeExcludedPackageExemptClasses(String 
commaDelimitedClasses)
     }
 
     private Set<String> parseExcludedPackageNames(String 
commaDelimitedPackageNames) {
-        Set<String> parsedSet = 
TextParseUtil.commaDelimitedStringToSet(commaDelimitedPackageNames);
+        Set<String> parsedSet = 
commaDelimitedStringToSet(commaDelimitedPackageNames)
+                .stream().map(s -> strip(s, ".")).collect(toSet());

Review Comment:
   I think it's unintuitive to require a period at the end of each excluded 
package. Currently if the period is missed, the exclusion will act like the 
regex `com\.package.*` which likely isn't what users configuring their 
application intend.
   
   By stripping the period here, we retain backwards compatibility for excluded 
package lists that still have trailing periods.
   
   However, we do drop support for wildcard package exclusions where 
applications didn't include a trailing period and genuinely desired the 
previous behaviour. They will need to move such exclusions to the regex 
exclusion list instead.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to