Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0D6E17D06 for ; Thu, 5 Mar 2015 05:55:44 +0000 (UTC) Received: (qmail 31550 invoked by uid 500); 5 Mar 2015 05:55:38 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 31516 invoked by uid 500); 5 Mar 2015 05:55:38 -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 31506 invoked by uid 99); 5 Mar 2015 05:55:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2015 05:55:38 +0000 Date: Thu, 5 Mar 2015 05:55:38 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4457) FileUploadInterceptor uses injected pattern matcher 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-4457?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1434820= 0#comment-14348200 ]=20 Lukasz Lenart commented on WW-4457: ----------------------------------- but then it will always use the same matcher, I thought about adding anothe= r extension point to allow use different implementations. The problem is th= at an alias for such type was already registered in the internal DI so it m= ust be represented by different type. > FileUploadInterceptor uses injected pattern matcher > --------------------------------------------------- > > Key: WW-4457 > URL: https://issues.apache.org/jira/browse/WW-4457 > Project: Struts 2 > Issue Type: Bug > Components: Core Interceptors > Reporter: Aleksandr Mashchenko > Fix For: 2.3.x > > > Currently {{FileUploadInterceptor}} uses injected pattern matcher for che= cking {{allowedTypes}}, which yields inconsistent behavior with different d= efault pattern matchers. Some mime types which are working fine with {{Wild= cardHelper}} are not working with the {{RegexPatternMatcher}}, because of t= he special regex character presented in them (e.g. {{image/svg+xml}} - {{+}= } is a special character in regex). > IMO file upload interceptor should use {{WildcardHelper}} no matter what = pattern matcher is set as the default one. Or is there any point in injecti= ng pattern matcher in file upload interceptor? > Original report: [=E2=80=9CContent-Type not allowed=E2=80=9D while upload= ing an SVG file, that is in the allowed whitelist|http://stackoverflow.com/= q/28304692/1700321] -- This message was sent by Atlassian JIRA (v6.3.4#6332)