Closed techBrandon closed 4 months ago
Woah, awesome find, Brandon! I'd love to see this bug reproduced if possible. Happy to see a simple fix either way!
Merged into testing. Will be part of 2024.8!
@TrimarcJake The block of code this lives in could live well in its own function. Might add to the backlog.
When using the += adding an empty value still increments the count of the object and therefore when adding the pipe between entries it will result in a double pipe.
This double pipe causes problems in the Find-ESC1.ps1 script when the $SafeUsers variable is evaluated causing the "($SID -notmatch $SafeUsers)" to wrongfully fail. This results in false-negative reporting for any checks using this this type of logic.
The existence of the empty item in $SafeUsers will always match on any $SID and therefore no templates will ever report as being misconfigured.