From 3cba2286613f1f8cf132ecefec4b159f4c65e617 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Tue, 26 Jul 2022 11:43:06 -0700 Subject: [PATCH] Password not complex enough. --- init.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.ps1 b/init.ps1 index 32d6742..f2b345a 100644 --- a/init.ps1 +++ b/init.ps1 @@ -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.')