Do not update list of blocked extensions |
The assembly should not access property Microsoft.SharePoint.Administration.SPWebApplication.BlockedFileExtensions and also update the web application. The rule assumes that the list of blocked file extensions has been changed by the code.
CheckId | SPC020201 |
---|---|
TypeName | DoNotUpdateBlockedFileExtensions |
Severity | CriticalWarning |
Type | Assembly |
Remove calls to method Update() of Microsoft.SharePoint.Administration.SPWebApplication.BlockedFileExtensions.
The rule cannot check if the list of blocked file extensions 'Microsoft.SharePoint.Administration.SPWebApplication.BlockedFileExtensions' has been changed, because the list is a simple string list. But if Microsoft.SharePoint.Administration.SPWebApplication.Update is called in the same assembly it is assumed that the list may have changed
To suppress this violation in managed code add the following attribute to the method which contains the instruction (available since SPCAF version v5.2). Learn more about SuppressMessage here.
[SuppressMessage("SPCAF.Rules.SecurityGroup", "SPC020201:DoNotUpdateBlockedFileExtensions", Justification = "Provide reason for suppression here")]