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 F2D4B17D61 for ; Fri, 13 Mar 2015 10:14:38 +0000 (UTC) Received: (qmail 70529 invoked by uid 500); 13 Mar 2015 10:14:38 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 70484 invoked by uid 500); 13 Mar 2015 10:14: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 70473 invoked by uid 99); 13 Mar 2015 10:14:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2015 10:14:38 +0000 Date: Fri, 13 Mar 2015 10:14:38 +0000 (UTC) From: "Andrea Ligios (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (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=3D1436016= 7#comment-14360167 ]=20 Andrea Ligios edited comment on WW-4457 at 3/13/15 10:14 AM: ------------------------------------------------------------- It doesn't seem to work; I've tested my code with [this struts2-core 2.3.22= SNAPSHOT|https://repository.apache.org/content/groups/snapshots/org/apache= /struts/struts2-core/2.3.22-SNAPSHOT/struts2-core-2.3.22-20150307.084404-13= .jar], and all the other struts jars on 2.3.16.3. The behaviour is the same of 2.3.16.3:=20 {code:java}"image/svg\\+xml"{code} works,=20 {code:java}"image/svg+xml"{code} doesn't. was (Author: andrea ligios): It doesn't seem to work; I've tested my code with this struts2-core 2.3.22 = SNAPSHOT:=20 https://repository.apache.org/content/groups/snapshots/org/apache/struts/st= ruts2-core/2.3.22-SNAPSHOT/struts2-core-2.3.22-20150307.084404-13.jar=20 and all the other struts jars on 2.3.16.3. The behaviour is the same of 2.3.16.3:=20 {code:java}"image/svg\\+xml"{code} works,=20 {code:java}"image/svg+xml"{code} doesn't. > 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 > Assignee: Lukasz Lenart > Fix For: 2.3.22 > > > 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)