Skip to content

Commit 9a2bf69

Browse files
authored
[-] escape user password as XML value, fixes #74 (#77)
1 parent ba4774e commit 9a2bf69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if($null -eq $out)
3030
$Password = ("a".."z")+("A".."Z") | Get-Random -Count 4
3131
$Password += ("!"..".") | Get-Random -Count 2
3232
$Password += ("0".."9") | Get-Random -Count 2
33-
$Password = -join($Password)
33+
$Password = [Security.SecurityElement]::Escape(-join($Password))
3434

3535
$SecurePassword = ConvertTo-SecureString $Password -AsPlainText -Force
3636
New-LocalUser $userName -Password $SecurePassword -Description "Patroni service account"

0 commit comments

Comments
 (0)