You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2021/11/26 02:22:04 UTC

[GitHub] [cxf] reta commented on a change in pull request #878: CXF-8619 Prevent double URL-decoding for form parameters where the pa…

reta commented on a change in pull request #878:
URL: https://github.com/apache/cxf/pull/878#discussion_r757191549



##########
File path: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
##########
@@ -1153,6 +1153,17 @@ private static Object processFormParam(Message m, String key,
                 String body = FormUtils.readBody(entityStream, enc);
                 // Do not decode unless the key is empty value, fe @FormParam("")
                 FormUtils.populateMapFromStringOrHttpRequest(params, m, body, enc, StringUtils.isEmpty(key) && decode);
+
+                if (!StringUtils.isEmpty(key) && decode) {

Review comment:
       I think this is change is not right: it applies only when `if (params == null)`, which holds `true` for first parameter only. This is the reason why it was located at the end of the function. PS: the test cases are failing because of that.




-- 
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: dev-unsubscribe@cxf.apache.org

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