From issues-return-33271-archive-asf-public=cust-asf.ponee.io@struts.apache.org Tue Apr 23 09:52:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id CCC3818076D for ; Tue, 23 Apr 2019 11:52:02 +0200 (CEST) Received: (qmail 95039 invoked by uid 500); 23 Apr 2019 09:52:02 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 94952 invoked by uid 99); 23 Apr 2019 09:52:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2019 09:52:02 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E92D6E2AFF for ; Tue, 23 Apr 2019 09:52:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5EAD725815 for ; Tue, 23 Apr 2019 09:52:00 +0000 (UTC) Date: Tue, 23 Apr 2019 09:52:00 +0000 (UTC) From: "Yasser Zamani (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (WW-4958) File upload fails from certain clients MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4958?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Yasser Zamani resolved WW-4958. ------------------------------- Resolution: Fixed Assignee: Lukasz Lenart PRs got merged and imported to other branch. Thanks! > File upload fails from certain clients > -------------------------------------- > > Key: WW-4958 > URL: https://issues.apache.org/jira/browse/WW-4958 > Project: Struts 2 > Issue Type: Bug > Components: Dispatch Filter > Affects Versions: 2.5.17 > Reporter: Tam=C3=A1s Farag=C3=B3 > Assignee: Lukasz Lenart > Priority: Major > Fix For: 2.5.21, 2.6 > > > 2.5.11 added more validation on whether to accept file uploads. Previousl= y there was only a check if the HTTP header contained "multipart/form-data"= , now there is the following regex in Dispatcher::isMultipartRequest. > =C2=A0 > {quote}public static final String MULTIPART_FORM_DATA_REGEX =3D "^multipa= rt/form-data(; boundary=3D[0-9a-zA-Z'()+_,\\-./:=3D?]\{1,70})?(;charset=3D[= a-zA-Z\\-0-9]\{3,14})?";{quote} > =C2=A0 > This is too restrictive, apache http client for example adds a white spac= e between the semicolon and "charset" and thus all file uploads are failing= unless this regex is overwritten in the config.=C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)