[ 
https://issues.apache.org/jira/browse/WW-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14360167#comment-14360167
 ] 

Andrea Ligios commented on WW-4457:
-----------------------------------

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: 
"image/svg\\+xml" works, 
"image/svg+xml" 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 
> checking {{allowedTypes}}, which yields inconsistent behavior with different 
> default pattern matchers. Some mime types which are working fine with 
> {{WildcardHelper}} are not working with the {{RegexPatternMatcher}}, because 
> of the 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 injecting 
> pattern matcher in file upload interceptor?
> Original report: [“Content-Type not allowed” while uploading 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)

Reply via email to