You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/04/02 08:20:00 UTC

[jira] [Commented] (WW-5176) multipart/form-data parameters are not processed when charset is placed before boundary in Content-Type header

    [ https://issues.apache.org/jira/browse/WW-5176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17516249#comment-17516249 ] 

Lukasz Lenart commented on WW-5176:
-----------------------------------

You can define your own RegEx to match your case, read this https://struts.apache.org/core-developers/file-upload.html#request-validation

> multipart/form-data parameters are not processed when charset is placed before boundary in Content-Type header
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-5176
>                 URL: https://issues.apache.org/jira/browse/WW-5176
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter
>    Affects Versions: 2.5.29
>            Reporter: Sergey Zolotarev
>            Priority: Major
>
> The regex used inside isMultipartRequest() in Dispatcher.java expects the charset directive to be in the middle between the media type and boundary, but there are third-party libraries that append it after "bounary", which seems legitimate to me.
> i.e. this works:
> {code:java}
> Content-Type: multipart/form-data; bounary=123467890; charset=utf-8{code}
> this doesn't work:
> {code:java}
> Content-Type: multipart/form-data; charset=utf-8; bounary=123467890{code}
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)