From c1e1689a5583ebd169c47bee19c32e74c1df75ce Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Mon, 2 Feb 2026 16:52:26 +0100 Subject: [PATCH] Fix secure password prompt binding in deploy script --- scripts/deploy-ftp.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/deploy-ftp.ps1 b/scripts/deploy-ftp.ps1 index 8ec40ec..fc554c4 100644 --- a/scripts/deploy-ftp.ps1 +++ b/scripts/deploy-ftp.ps1 @@ -50,15 +50,15 @@ Assert-Tool $WinScpPath function Read-PlainOrPrompt([string]$Value, [string]$Prompt, [switch]$Secure) { if ($Value) { return $Value } if ($Secure) { - $secure = Read-Host -AsSecureString $Prompt + $secure = Read-Host -Prompt $Prompt -AsSecureString return [Runtime.InteropServices.Marshal]::PtrToStringUni( [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure) ) } - return Read-Host $Prompt + return Read-Host -Prompt $Prompt } -$FtpPassword = Read-PlainOrPrompt $FtpPassword "FTP password" +$FtpPassword = Read-PlainOrPrompt $FtpPassword "FTP password" -Secure $WinRmCredentialPass = Read-PlainOrPrompt $WinRmCredentialPass "WinRM password" -Secure Write-Host "1) Publishing..." -ForegroundColor Cyan