mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +00:00
Use Environment.TickCount64 instead of Datetime.Now as the random seed for AppLocker test file content (#14283)
This commit is contained in:
1 file changed
+1
-1
@@ -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