struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandr Mashchenko (JIRA)" <>
Subject [jira] [Comment Edited] (WW-4457) FileUploadInterceptor uses injected pattern matcher
Date Wed, 04 Mar 2015 17:20:09 GMT


Aleksandr Mashchenko edited comment on WW-4457 at 3/4/15 5:20 PM:

[~lukaszlenart]: Can't we just use {{@Inject("struts")}} on {{setMatcher}} setter?

was (Author: aleksandr-m):
[~lukaszlenart] Can't we just use {{@Inject("struts")}} on {{setMatcher}} setter?

> FileUploadInterceptor uses injected pattern matcher
> ---------------------------------------------------
>                 Key: WW-4457
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>            Reporter: Aleksandr Mashchenko
>             Fix For: 2.3.x
> 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
> Original report: [“Content-Type not allowed” while uploading an SVG file, that is
in the allowed whitelist|]

This message was sent by Atlassian JIRA

View raw message