Package org.apache.struts2.ognl
Class StrutsOgnlGuard
java.lang.Object
org.apache.struts2.ognl.StrutsOgnlGuard
- All Implemented Interfaces:
- OgnlGuard
The default implementation of 
OgnlGuard.- Since:
- 6.4.0
- 
Field SummaryFieldsFields inherited from interface org.apache.struts2.ognl.OgnlGuardEXPR_BLOCKED
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancheckNode(ognl.Node node) protected booleancontainsExcludedNodeType(ognl.Node node) booleanisParsedTreeBlocked(Object tree) Determines whether a parsed OGNL tree should be blocked based on some validation rules.booleanisRawExpressionBlocked(String expr) Determines whether an OGNL expression should be blocked based on validation done on only the raw expression, without parsing the tree.protected booleanrecurseNodes(ognl.Node node) protected booleanskipTreeCheck(ognl.Node tree) voiduseExcludedNodeTypes(String excludedNodeTypes) protected voidvalidateExcludedNodeTypes(Set<String> incomingExcludedNodeTypes) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.struts2.ognl.OgnlGuardisBlocked, parseExpression
- 
Field Details- 
excludedNodeTypes
 
- 
- 
Constructor Details- 
StrutsOgnlGuardpublic StrutsOgnlGuard()
 
- 
- 
Method Details- 
useExcludedNodeTypes
- 
validateExcludedNodeTypesprotected void validateExcludedNodeTypes(Set<String> incomingExcludedNodeTypes) throws ConfigurationException - Throws:
- ConfigurationException
 
- 
isRawExpressionBlockedDescription copied from interface:OgnlGuardDetermines whether an OGNL expression should be blocked based on validation done on only the raw expression, without parsing the tree.- Specified by:
- isRawExpressionBlockedin interface- OgnlGuard
- Parameters:
- expr- OGNL expression
- Returns:
- whether the expression should be blocked
 
- 
isParsedTreeBlockedDescription copied from interface:OgnlGuardDetermines whether a parsed OGNL tree should be blocked based on some validation rules.- Specified by:
- isParsedTreeBlockedin interface- OgnlGuard
- Parameters:
- tree- parsed OGNL tree
- Returns:
- whether the parsed tree should be blocked
 
- 
skipTreeCheckprotected boolean skipTreeCheck(ognl.Node tree) 
- 
recurseNodesprotected boolean recurseNodes(ognl.Node node) 
- 
checkNodeprotected boolean checkNode(ognl.Node node) 
- 
containsExcludedNodeTypeprotected boolean containsExcludedNodeType(ognl.Node node) 
 
-