Skip to content

Commit

Permalink
Fix randomization bug in GenerateRandomPassword function.
Browse files Browse the repository at this point in the history
  • Loading branch information
fadiksho authored and jasontaylordev committed Sep 24, 2023
1 parent bc4677a commit bb2de1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .scripts/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function GenerateRandomPassword {
[int]$Length = 16
)

$ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#^_-+=?<>|~"
$ValidChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#^_-+=?<>|~".ToCharArray()
$Password = -join ((Get-Random -Count $Length -InputObject $ValidChars) | Get-Random -Count $Length)

return $Password
Expand Down

0 comments on commit bb2de1a

Please sign in to comment.