Class FileStreamSecurityValidator
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Security
Assembly: Umbraco.Core.dll
Syntax
public class FileStreamSecurityValidator : IFileStreamSecurityValidator
Constructors
View SourceFileStreamSecurityValidator(IEnumerable<IFileStreamSecurityAnalyzer>)
Declaration
public FileStreamSecurityValidator(IEnumerable<IFileStreamSecurityAnalyzer> fileAnalyzers)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IFileStreamSecurityAnalyzer> | fileAnalyzers |
Methods
View SourceIsConsideredSafe(Stream)
Analyzes whether the file content is considered safe with registered IFileStreamSecurityAnalyzers
Declaration
public bool IsConsideredSafe(Stream fileStream)
Parameters
Type | Name | Description |
---|---|---|
Stream | fileStream | Needs to be a Read seekable stream |
Returns
Type | Description |
---|---|
System.Boolean | Whether the file is considered safe after running the necessary analyzers |