Click or drag to resize

DefaultScriptValidator Class

Optional, opt-in deny-list validator (defense-in-depth) wired by Repository.Init when SealServerConfiguration.EnableRazorScriptValidation is true. DISABLED by default because Seal scripts may legitimately use file/process/reflection APIs (e.g. report tasks). IMPORTANT: a substring deny-list on a Turing-complete language can be bypassed — this is only a speed-bump. The real security boundary remains "who is allowed to author/edit Razor scripts (reports, meta sources, security providers, dynamics)".
Inheritance Hierarchy
SystemObject
  Seal.HelpersScriptValidator
    Seal.HelpersDefaultScriptValidator

Namespace: Seal.Helpers
Assembly: SealLibrary (in SealLibrary.dll) Version: 10.0.1.0+a44cd3a7f03c2bf3cdbd971a878c679e40bed08a
Syntax
C#
public class DefaultScriptValidator : ScriptValidator

The DefaultScriptValidator type exposes the following members.

Constructors
 NameDescription
Public methodDefaultScriptValidatorInitializes a new instance of the DefaultScriptValidator class
Top
Methods
 NameDescription
Public methodCheckScriptReject the script if it contains any forbidden token (case-insensitive).
(Overrides ScriptValidatorCheckScript(String))
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Public fieldStatic memberDefaultForbiddenTokensConservative starter deny-list, used when no custom tokens are configured.
Top
See Also