Package org.htmlunit.csp.directive
Class SourceExpressionDirective
- java.lang.Object
-
- org.htmlunit.csp.Directive
-
- org.htmlunit.csp.directive.HostSourceDirective
-
- org.htmlunit.csp.directive.SourceExpressionDirective
-
public class SourceExpressionDirective extends HostSourceDirective
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.htmlunit.csp.Directive
Directive.DirectiveErrorConsumer
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Hash>hashes_private java.util.List<Nonce>nonces_private static java.lang.StringREPORT_SAMPLEprivate booleanreportSample_private static java.lang.StringSTRICT_DYNAMICprivate booleanstrictDynamic_private static java.lang.StringUNSAFE_ALLOW_REDIRECTSprivate static java.lang.StringUNSAFE_EVALprivate static java.lang.StringUNSAFE_HASHESprivate static java.lang.StringUNSAFE_INLINEprivate booleanunsafeAllowRedirects_private booleanunsafeEval_private booleanunsafeHashes_private booleanunsafeInline_private booleanunsafeWasm_private static java.lang.StringWASM_UNSAFE_EVAL-
Fields inherited from class org.htmlunit.csp.Directive
containsNonDirectiveCharacter, IS_DIRECTIVE_NAME
-
-
Constructor Summary
Constructors Constructor Description SourceExpressionDirective(java.util.List<java.lang.String> values, Directive.DirectiveErrorConsumer errors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanaddHash(Hash hash, int index, Directive.DirectiveErrorConsumer errors)private booleanaddNonce(Nonce nonce, int index, Directive.DirectiveErrorConsumer errors)java.util.List<Hash>getHashes()java.util.List<Nonce>getNonces()booleanreportSample()booleanstrictDynamic()booleanunsafeAllowRedirects()booleanunsafeEval()booleanunsafeHashes()booleanunsafeInline()-
Methods inherited from class org.htmlunit.csp.directive.HostSourceDirective
addHostOrSchemeDuringConstruction, addValue, getHosts, getNone, getSchemes, removeValueIgnoreCase, self, star
-
-
-
-
Field Detail
-
REPORT_SAMPLE
private static final java.lang.String REPORT_SAMPLE
- See Also:
- Constant Field Values
-
UNSAFE_INLINE
private static final java.lang.String UNSAFE_INLINE
- See Also:
- Constant Field Values
-
STRICT_DYNAMIC
private static final java.lang.String STRICT_DYNAMIC
- See Also:
- Constant Field Values
-
UNSAFE_ALLOW_REDIRECTS
private static final java.lang.String UNSAFE_ALLOW_REDIRECTS
- See Also:
- Constant Field Values
-
UNSAFE_EVAL
private static final java.lang.String UNSAFE_EVAL
- See Also:
- Constant Field Values
-
UNSAFE_HASHES
private static final java.lang.String UNSAFE_HASHES
- See Also:
- Constant Field Values
-
WASM_UNSAFE_EVAL
private static final java.lang.String WASM_UNSAFE_EVAL
- See Also:
- Constant Field Values
-
unsafeInline_
private boolean unsafeInline_
-
unsafeEval_
private boolean unsafeEval_
-
strictDynamic_
private boolean strictDynamic_
-
unsafeHashes_
private boolean unsafeHashes_
-
reportSample_
private boolean reportSample_
-
unsafeAllowRedirects_
private boolean unsafeAllowRedirects_
-
unsafeWasm_
private boolean unsafeWasm_
-
nonces_
private final java.util.List<Nonce> nonces_
-
hashes_
private final java.util.List<Hash> hashes_
-
-
Constructor Detail
-
SourceExpressionDirective
public SourceExpressionDirective(java.util.List<java.lang.String> values, Directive.DirectiveErrorConsumer errors)
-
-
Method Detail
-
addNonce
private boolean addNonce(Nonce nonce, int index, Directive.DirectiveErrorConsumer errors)
-
addHash
private boolean addHash(Hash hash, int index, Directive.DirectiveErrorConsumer errors)
-
unsafeInline
public boolean unsafeInline()
-
unsafeEval
public boolean unsafeEval()
-
strictDynamic
public boolean strictDynamic()
-
unsafeHashes
public boolean unsafeHashes()
-
reportSample
public boolean reportSample()
-
unsafeAllowRedirects
public boolean unsafeAllowRedirects()
-
getNonces
public java.util.List<Nonce> getNonces()
-
getHashes
public java.util.List<Hash> getHashes()
-
-