kusalk commented on code in PR #1072:
URL: https://github.com/apache/struts/pull/1072#discussion_r1797691255
##########
core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java:
##########
@@ -400,8 +411,10 @@ protected boolean
hasValidAnnotatedPropertyDescriptor(Object action, PropertyDes
}
return false;
}
+ LOG.debug("Success: Matching annotated method [{}] found for property
[{}] of depth [{}] on Action [{}]",
+ relevantMethod.getName(), propDesc.getName(), paramDepth,
action.getClass().getSimpleName());
if (paramDepth >= 1) {
- allowlistClass(relevantMethod.getReturnType());
+ allowlistClass(propDesc.getPropertyType());
Review Comment:
Minor fix here to ensure the specific model type is allowlisted rather than
the type declared in the interface (`Object.class`)
##########
core/src/main/java/org/apache/struts2/interceptor/parameter/ParametersInterceptor.java:
##########
@@ -400,8 +411,10 @@ protected boolean
hasValidAnnotatedPropertyDescriptor(Object action, PropertyDes
}
return false;
}
+ LOG.debug("Success: Matching annotated method [{}] found for property
[{}] of depth [{}] on Action [{}]",
+ relevantMethod.getName(), propDesc.getName(), paramDepth,
action.getClass().getSimpleName());
if (paramDepth >= 1) {
- allowlistClass(relevantMethod.getReturnType());
+ allowlistClass(propDesc.getPropertyType());
Review Comment:
Minor fix here to ensure the specific model type is allowlisted rather than
the type declared in the interface (`Object.class`) - thanks @lukaszlenart
--
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]