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


##########
core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java:
##########
@@ -147,7 +147,7 @@ public boolean isAccessible(Map context, Object target, 
Member member, String pr
         if (target != null) {
             // Special case: Target is a Class object but not Class.class
             if (Class.class.equals(target.getClass()) && 
!Class.class.equals(target)) {
-                if (!isStatic(member)) {
+                if (!isStatic(member) && Arrays.stream(((Class<?>) 
target).getConstructors()).noneMatch(p -> 
p.getClass().equals(member.getClass()))) {

Review Comment:
   Thanks @lukaszlenart for writing the test case - I did indeed overlook the 
constructor case, I've pushed a commit to this PR with the appropriate fix :)



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