Class InternalPolicy
java.lang.Object
org.owasp.validator.html.Policy
org.owasp.validator.html.InternalPolicy
Contains a bunch of optimized lookups over the regular Policy Class. For internal use only.
Not part of any public API and may explode or self-destruct at any given moment, preferably both.
- Author:
- Kristian Rosenvold
-
Nested Class Summary
Nested classes/interfaces inherited from class org.owasp.validator.html.Policy
Policy.ParseContext -
Field Summary
Fields inherited from class org.owasp.validator.html.Policy
ACTION_ENCODE, ACTION_FILTER, ACTION_TRUNCATE, ACTION_VALIDATE, ALLOW_DYNAMIC_ATTRIBUTES, ANCHORS_NOFOLLOW, ANCHORS_NOOPENER_NOREFERRER, ANYTHING_REGEXP, CONNECTION_TIMEOUT, cssRules, DEFAULT_MAX_INPUT_SIZE, DEFAULT_MAX_STYLESHEET_IMPORTS, DEFAULT_POLICY_URI, directives, DISALLOW_DOCTYPE_DECL, EMBED_STYLESHEETS, ENTITY_ENCODE_INTL_CHARS, EXTERNAL_GENERAL_ENTITIES, EXTERNAL_PARAM_ENTITIES, FORMAT_OUTPUT, LOAD_EXTERNAL_DTD, logger, MAX_INPUT_SIZE, MAX_STYLESHEET_IMPORTS, OMIT_DOCTYPE_DECLARATION, OMIT_XML_DECLARATION, PRESERVE_COMMENTS, PRESERVE_SPACE, tagRules, VALIDATE_PARAM_AS_EMBED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInternalPolicy(Policy.ParseContext parseContext) protectedInternalPolicy(Policy old, Map<String, String> directives, Map<String, Tag> tagRules, Map<String, Property> cssRules) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum input size.intbooleanbooleanDeprecated.Remote styles import feature to be removed and along with this error message.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanMethods inherited from class org.owasp.validator.html.Policy
cloneWithDirective, getAllowedEmptyTags, getCommonRegularExpressions, getDirective, getDynamicAttributeByName, getGlobalAttributeByName, getInstance, getInstance, getInstance, getInstance, getInstance, getParseContext, getPropertyByName, getRequiresClosingTags, getSimpleParseContext, getSourceFromUrl, getTagByLowercaseName, getTopLevelElement, getTopLevelElement, resolveEntity
-
Constructor Details
-
InternalPolicy
-
InternalPolicy
-
-
Method Details
-
getEmbedTag
-
getStyleTag
-
isEmbedStyleSheets
Deprecated.Remote styles import feature to be removed and along with this error message.Returns whether remote CSS can be imported. NOTE: This is dangerous and should not be enabled.- Returns:
- True if remote CSS is allowed, false otherwise.
-
isPreserveComments
public boolean isPreserveComments() -
getMaxInputSize
public int getMaxInputSize() -
isEntityEncodeIntlCharacters
public boolean isEntityEncodeIntlCharacters() -
isNofollowAnchors
public boolean isNofollowAnchors() -
isNoopenerAndNoreferrerAnchors
public boolean isNoopenerAndNoreferrerAnchors() -
isValidateParamAsEmbed
public boolean isValidateParamAsEmbed() -
isFormatOutput
public boolean isFormatOutput() -
isPreserveSpace
public boolean isPreserveSpace() -
isOmitXmlDeclaration
public boolean isOmitXmlDeclaration() -
isOmitDoctypeDeclaration
public boolean isOmitDoctypeDeclaration() -
getOnUnknownTag
-
isEncodeUnknownTag
public boolean isEncodeUnknownTag() -
isAllowDynamicAttributes
public boolean isAllowDynamicAttributes() -
determineMaxInputSize
public int determineMaxInputSize()Returns the maximum input size. If this value is not specified by the policy, theDEFAULT_MAX_INPUT_SIZEis used.- Returns:
- the maximum input size.
-