mirror of https://github.com/raandree/NTFSSecurity
Browse Source
IdentityReference2.Equals(string) lowercased both names with ToLower(), which uses the culture of the thread. In tr-TR, I becomes U+0131, so an account whose name holds an uppercase I (NT AUTHORITY\SYSTEM, BUILTIN\Administrators) no longer matched the same name in another case, for example $entry.Account -eq 'nt authority\system'. Compare with StringComparison.OrdinalIgnoreCase. The test sets the culture of the thread to tr-TR and compares the system account with its name in three cases. Before the fix it fails in all four configurations (elevated and basic user, Windows PowerShell 5.1 and PowerShell 7); after it, all rows pass. The unit suite under tr-TR did not find it, because no test compares a name that holds an uppercase I. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant <ai@example.com>ai/coverage-unknowns
3 changed files with 27 additions and 1 deletions
Loading…
Reference in new issue