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 2022/05/03 08:34:54 UTC

[GitHub] [struts] lukaszlenart commented on a diff in pull request #546: update isClassExcluded logic

lukaszlenart commented on code in PR #546:
URL: https://github.com/apache/struts/pull/546#discussion_r863569592


##########
core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java:
##########
@@ -168,8 +170,20 @@ protected boolean isClassExcluded(Class<?> clazz) {
             return true;
         }
         for (Class<?> excludedClass : excludedClasses) {
-            if (clazz.isAssignableFrom(excludedClass)) {
-                return true;
+            if(excludedClass != Object.class) {
+                if(clazz.getName().startsWith(packageName)){

Review Comment:
   Why do you need this check? The whole `com.opensymphony.xwork2.ognl.` package is already excluded and [package exclusion is tested before class exclusion](https://github.com/apache/struts/pull/546/files#diff-bd4f5dc22219d389a455107a004139c3fa3a94b9493946dc9b0c927f26217853L85-L99)



-- 
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: issues-unsubscribe@struts.apache.org

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