struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (WW-4958) File upload fails from certain clients
Date Tue, 23 Apr 2019 06:26:00 GMT


ASF subversion and git services commented on WW-4958:

Commit f94b6810502ccad743c4a915a3fcde25b5ff1e3c in struts's branch refs/heads/struts-2-5-x
from Yasser Zamani
[;h=f94b681 ]

fix multipart request RegEx

Note: Unlike some similar constructs in other header fields, media
type parameters do not allow whitespace (even "bad" whitespace)
around the "=" character.

See also: WW-4958

> 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.5.21, 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