Problem: Insecure temporary file creation methods should not be used.
var tempZipName = Path.GetTempFileName();
var tempEntryName = Path.GetTempFileName();
Solution:
var tempFolderPath = Path.GetTempPath();
var tempZipName = Path.Combine(tempFolderPath, Path.GetRandomFileName());
var tempEntryName = Path.Combine(tempFolderPath, Path.GetRandomFileName());
.NET 4.8 Compatibility issue
Problem:CodePagesEncodingProvider is not available in .NET 4.8
Security Issue
Problem: Insecure temporary file creation methods should not be used.
Solution:
.NET 4.8 Compatibility issue
Problem:
CodePagesEncodingProvider
is not available in .NET 4.8Solution: Use condition to exclude code for .NET 48 build: