From issues-return-33269-archive-asf-public=cust-asf.ponee.io@struts.apache.org Tue Apr 23 07:47:02 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 B7B1B180621 for ; Tue, 23 Apr 2019 09:47:01 +0200 (CEST) Received: (qmail 70252 invoked by uid 500); 23 Apr 2019 07:47: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 70237 invoked by uid 99); 23 Apr 2019 07:47:00 -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 07:47:00 +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 608BBE0F50 for ; Tue, 23 Apr 2019 07:47: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 20DD525807 for ; Tue, 23 Apr 2019 07:47:00 +0000 (UTC) Date: Tue, 23 Apr 2019 07:47:00 +0000 (UTC) From: "Yasser Zamani (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=3D1682378= 2#comment-16823782 ]=20 Yasser Zamani commented on WW-4958: ----------------------------------- Yes I think=C2=A0-=C2=A0I'll after HUDSON approval :) > 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)