kusalk commented on code in PR #715:
URL: https://github.com/apache/struts/pull/715#discussion_r1278864406
##########
core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java:
##########
@@ -194,7 +194,7 @@ private Set<Class<?>> parseClasses(String
commaDelimitedClasses) {
try {
classes.add(Class.forName(className));
} catch (ClassNotFoundException e) {
- throw new ConfigurationException("Cannot load class for
exclusion/exemption configuration: " + className, e);
+ LOG.warn("Class: {} doesn't exist, ignoring it!", className);
Review Comment:
I would strongly advise against this - a ConfigurationException prevents the
application from starting when an invalid exclusion list is provided (e.g.
accidentally left out a comma or misspelt a class).
If we're going to change this to a warning, I think we need additional
validation to prevent mistakes that lead to decreased security.
Alternatively, consider implementing an `optionalExcludedClasses` instead
for classes that may not be present in every Struts application.
--
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]