mirror of https://github.com/apache/archiva.git
[MRM-1487] simplify previous fix !
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1156242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5ee3d9ee40
commit
b36ed8a621
|
@ -1,31 +0,0 @@
|
|||
package org.apache.maven.archiva.web.interceptor;
|
||||
|
||||
import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: olamy
|
||||
* Date: 10/08/11
|
||||
* Time: 16:55
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public class ArchivaParametersInterceptor extends ParametersInterceptor
|
||||
{
|
||||
|
||||
private String acceptedParamNames = "[a-zA-Z0-9\\-\\.\\]\\[\\(\\)_'\\s]+";
|
||||
private Pattern acceptedPattern = Pattern.compile(acceptedParamNames);
|
||||
|
||||
@Override
|
||||
protected boolean acceptableName( String name )
|
||||
{
|
||||
boolean accept = super.acceptableName( name );
|
||||
if (!accept)
|
||||
{
|
||||
// [MRM-1487] second try adding '-' in pattern
|
||||
accept = acceptedPattern.matcher( name ).matches();
|
||||
}
|
||||
return accept;
|
||||
}
|
||||
}
|
|
@ -36,8 +36,6 @@
|
|||
<interceptor name="redbackAutoLogin" class="redbackAutoLoginInterceptor"/>
|
||||
<interceptor name="redbackPolicyEnforcement" class="redbackPolicyEnforcementInterceptor"/>
|
||||
<interceptor name="paramFilter" class="com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor"/>
|
||||
<interceptor name="archivaParams" class="org.apache.maven.archiva.web.interceptor.ArchivaParametersInterceptor"/>
|
||||
|
||||
|
||||
<interceptor-stack name="defaultArchivaStack">
|
||||
<interceptor-ref name="exception"/>
|
||||
|
@ -54,8 +52,9 @@
|
|||
<interceptor-ref name="multiselect"/>
|
||||
<interceptor-ref name="staticParams"/>
|
||||
<interceptor-ref name="actionMappingParams"/>
|
||||
<interceptor-ref name="archivaParams">
|
||||
<interceptor-ref name="params">
|
||||
<param name="excludeParams">dojo\..*,^struts\..*</param>
|
||||
<param name="acceptParamNames">[a-zA-Z0-9\-\.\]\[\(\)_'\s]+</param>
|
||||
</interceptor-ref>
|
||||
<interceptor-ref name="conversionError"/>
|
||||
<interceptor-ref name="validation">
|
||||
|
@ -110,7 +109,7 @@
|
|||
|
||||
<interceptor-stack name="configuredPrepareParamsStack">
|
||||
<!-- <interceptor-ref name="prepare" /> -->
|
||||
<interceptor-ref name="archivaParams"/>
|
||||
<interceptor-ref name="params"/>
|
||||
<interceptor-ref name="configuredArchivaStack"/>
|
||||
</interceptor-stack>
|
||||
</interceptors>
|
||||
|
|
Loading…
Reference in New Issue