From issues-return-33215-archive-asf-public=cust-asf.ponee.io@struts.apache.org Sat Mar 30 08:21: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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 77642180626 for ; Sat, 30 Mar 2019 09:21:02 +0100 (CET) Received: (qmail 82312 invoked by uid 500); 30 Mar 2019 08:21:01 -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 82302 invoked by uid 99); 30 Mar 2019 08:21:01 -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; Sat, 30 Mar 2019 08:21:01 +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 B3FCEE29C2 for ; Sat, 30 Mar 2019 08:21: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 2FC6C2459D for ; Sat, 30 Mar 2019 08:21:00 +0000 (UTC) Date: Sat, 30 Mar 2019 08:21:00 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1680571= 2#comment-16805712 ]=20 Lukasz Lenart commented on WW-4958: ----------------------------------- Thanks, I have opened a PR with slightly modified version of James' proposa= l, let me know if that's ok :) > 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 > 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)