Class SourceExpressionDirective
- java.lang.Object
-
- com.shapesecurity.salvation2.Directive
-
- com.shapesecurity.salvation2.Directives.HostSourceDirective
-
- com.shapesecurity.salvation2.Directives.SourceExpressionDirective
-
public class SourceExpressionDirective extends HostSourceDirective
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.shapesecurity.salvation2.Directive
Directive.DirectiveErrorConsumer, Directive.ManipulationErrorConsumer
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Hash>hashesprivate java.util.List<Nonce>noncesprivate booleanreportSampleprivate booleanstrictDynamicprivate booleanunsafeAllowRedirectsprivate booleanunsafeEvalprivate booleanunsafeHashesprivate booleanunsafeInline-
Fields inherited from class com.shapesecurity.salvation2.Directives.HostSourceDirective
hosts, none, schemes, self, star
-
Fields inherited from class com.shapesecurity.salvation2.Directive
containsNonDirectiveCharacter, values
-
-
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 boolean_addHash(Hash hash, int index, Directive.DirectiveErrorConsumer errors)private boolean_addNonce(Nonce nonce, int index, Directive.DirectiveErrorConsumer errors)voidaddHash(Hash hash, Directive.ManipulationErrorConsumer errors)voidaddNonce(Nonce nonce, Directive.ManipulationErrorConsumer errors)java.util.List<Hash>getHashes()java.util.List<Nonce>getNonces()booleanremoveHash(Hash hash)booleanremoveNonce(Nonce nonce)booleanreportSample()voidsetReportSample(boolean reportSample)voidsetStrictDynamic(boolean strictDynamic)voidsetUnsafeAllowRedirects(boolean unsafeAllowRedirects)voidsetUnsafeEval(boolean unsafeEval)voidsetUnsafeHashes(boolean unsafeHashes)voidsetUnsafeInline(boolean unsafeInline)booleanstrictDynamic()booleanunsafeAllowRedirects()booleanunsafeEval()booleanunsafeHashes()booleanunsafeInline()-
Methods inherited from class com.shapesecurity.salvation2.Directives.HostSourceDirective
_addHostOrSchemeDuringConstruction, addHost, addScheme, addValue, getHosts, getSchemes, removeHost, removeScheme, removeValueIgnoreCase, removeValuesMatching, self, setSelf, setStar, star
-
Methods inherited from class com.shapesecurity.salvation2.Directive
getValues, wrapManipulationErrorConsumer
-
-
-
-
Field Detail
-
unsafeInline
private boolean unsafeInline
-
unsafeEval
private boolean unsafeEval
-
strictDynamic
private boolean strictDynamic
-
unsafeHashes
private boolean unsafeHashes
-
reportSample
private boolean reportSample
-
unsafeAllowRedirects
private boolean unsafeAllowRedirects
-
nonces
private java.util.List<Nonce> nonces
-
hashes
private 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()
-
setUnsafeInline
public void setUnsafeInline(boolean unsafeInline)
-
unsafeEval
public boolean unsafeEval()
-
setUnsafeEval
public void setUnsafeEval(boolean unsafeEval)
-
strictDynamic
public boolean strictDynamic()
-
setStrictDynamic
public void setStrictDynamic(boolean strictDynamic)
-
unsafeHashes
public boolean unsafeHashes()
-
setUnsafeHashes
public void setUnsafeHashes(boolean unsafeHashes)
-
reportSample
public boolean reportSample()
-
setReportSample
public void setReportSample(boolean reportSample)
-
unsafeAllowRedirects
public boolean unsafeAllowRedirects()
-
setUnsafeAllowRedirects
public void setUnsafeAllowRedirects(boolean unsafeAllowRedirects)
-
getNonces
public java.util.List<Nonce> getNonces()
-
addNonce
public void addNonce(Nonce nonce, Directive.ManipulationErrorConsumer errors)
-
removeNonce
public boolean removeNonce(Nonce nonce)
-
getHashes
public java.util.List<Hash> getHashes()
-
addHash
public void addHash(Hash hash, Directive.ManipulationErrorConsumer errors)
-
removeHash
public boolean removeHash(Hash hash)
-
-