mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use Environment.TickCount64 instead of Datetime.Now as the random seed for AppLocker test file content (#14283)
This commit is contained in:
@@ -230,7 +230,7 @@ namespace System.Management.Automation.Security
|
||||
|
||||
// AppLocker fails when you try to check a policy on a file
|
||||
// with no content. So create a scratch file and test on that.
|
||||
string dtAppLockerTestFileContents = AppLockerTestFileContents + DateTime.Now;
|
||||
string dtAppLockerTestFileContents = AppLockerTestFileContents + Environment.TickCount64;
|
||||
IO.File.WriteAllText(testPathScript, dtAppLockerTestFileContents);
|
||||
IO.File.WriteAllText(testPathModule, dtAppLockerTestFileContents);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user