brianandle commented on code in PR #557:
URL: https://github.com/apache/struts/pull/557#discussion_r889007813


##########
core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java:
##########
@@ -292,6 +327,28 @@ protected boolean acceptableName(String name) {
         return accepted;
     }
 
+    /**
+     * Validates:
+     * * Name is within the max length of a parameter name
+     * * Name is not excluded
+     * * Name is accepted
+     * * Value is null/blank
+     * * Value is not excluded
+     * * Value is accepted
+     * 
+     * @param name - Name to check
+     * @param value - value to check
+     * @return true if accepted
+     */
+    protected boolean acceptableNameValue(String name, String value) {
+       boolean accepted = isWithinLengthLimit(name) && !isExcluded(name) && 
isAccepted(name) 
+                       && (value == null || value.isEmpty() || 
(!isParamValueExcluded(value) && isParamValueAccepted(value)));
+        if (devMode && accepted) { // notify only when in devMode
+            LOG.debug("Parameter [{}] was accepted with value [{}] and will be 
appended to action!", name, value);

Review Comment:
   Done



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