Skip to content

Commit

Permalink
Password not complex enough.
Browse files Browse the repository at this point in the history
  • Loading branch information
splatteredbits committed Jul 26, 2022
1 parent e220496 commit 3cba228
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ if( -not (Test-Path -Path $passwordPath) )
$password = [Convert]::ToBase64String($randomBytes)
}
# Password needs to contain uppercase letter, lowercase letter, and a number.
while( $password -cnotmatch '[A-Z]' -and $password -cnotmatch '[a-z]' -and $password -notmatch '\d' )
while( $password -cnotmatch '[A-Z]' -and $password -cnotmatch '[a-z]' -and $password -notmatch '\d' -and `
$password -notmatch ([regex]::Escape('`~!@#$%^&*()_+-=[]\{}|;'':",./<>?')) )
$password | Set-Content -Path $passwordPath

Write-Verbose -Message ('Generating IV for encrypting test account password on Linux.')
Expand Down

0 comments on commit 3cba228

Please sign in to comment.