Class SafeParametersInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
com.opensymphony.xwork2.interceptor.ParametersInterceptor
com.atlassian.crowd.xwork.interceptors.SafeParametersInterceptor
- All Implemented Interfaces:
com.opensymphony.xwork2.interceptor.Interceptor
,Serializable
public class SafeParametersInterceptor
extends com.opensymphony.xwork2.interceptor.ParametersInterceptor
Injects submitted form parameters into action properties. This implementation performs white-list based
sanity checks on incoming parameters before allowing OGNL to perform any potentially dangerous operations on
an action, closing off an entire category of parameter injection attacks.
Parameters that set a value on an action directly will be allowed. However:
- To defend against possible OGNL vulnerabilities (especially Unicode attacks), parameter names will be filtered so only ascii alphanumeric characters (plus the underscore) are permitted
Portions of this class are copied from XWork under the Apache license, Copyright (c) 2002-2003 by OpenSymphony
- See Also:
-
Field Summary
Fields inherited from class com.opensymphony.xwork2.interceptor.ParametersInterceptor
ordered, PARAM_NAME_MAX_LENGTH
Fields inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
excludeMethods, includeMethods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isAcceptableParameter
(String name, Object action) Methods inherited from class com.opensymphony.xwork2.interceptor.ParametersInterceptor
acceptableName, addParametersToContext, doIntercept, getOrderedComparator, getParameterLogMap, isAccepted, isExcluded, isOrdered, isWithinLengthLimit, notifyDeveloperParameterException, retrieveParameters, setAcceptedPatterns, setAcceptParamNames, setDevMode, setExcludedPatterns, setExcludeParams, setOrdered, setParameters, setParamNameMaxLength, setValueStackFactory
Methods inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods
Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
destroy, init
-
Constructor Details
-
SafeParametersInterceptor
public SafeParametersInterceptor()
-
-
Method Details
-
isAcceptableParameter
- Overrides:
isAcceptableParameter
in classcom.opensymphony.xwork2.interceptor.ParametersInterceptor
-