struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tamás Faragó (JIRA) <>
Subject [jira] [Commented] (WW-4958) File upload fails from certain clients
Date Thu, 03 Jan 2019 20:05:00 GMT


Tamás Faragó commented on WW-4958:

Yes, this is resolved for Apache httpclient. Obviously there are a lot more combinations of
browsers, http clients out there so I really wonder if strust should be so restrictive by
Maybe just that it starts with multipart/form-data and contains one, both or none of charset/boundary?

> File upload fails from certain clients
> --------------------------------------
>                 Key: WW-4958
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter
>    Affects Versions: 2.5.17
>            Reporter: Tamás Faragó
>            Priority: Major
>             Fix For: 2.6
> 2.5.11 added more validation on whether to accept file uploads. Previously there was
only a check if the HTTP header contained "multipart/form-data", now there is the following
regex in Dispatcher::isMultipartRequest.
> {quote}public static final String MULTIPART_FORM_DATA_REGEX = "^multipart/form-data(;
> This is too restrictive, apache http client for example adds a white space between the
semicolon and "charset" and thus all file uploads are failing unless this regex is overwritten
in the config. 

This message was sent by Atlassian JIRA

View raw message