Fix incorrect SecureString handling for empty service user password

Fixes #85
This commit is contained in:
Lord Hepipud 2020-07-29 14:36:59 +02:00
parent 15e5e1efef
commit b282bcfa3a
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#79](https://github.com/Icinga/icinga-powershell-framework/issues/79) Fix ConvertTo-Seconds to output valid numeric data with multiple digits * [#79](https://github.com/Icinga/icinga-powershell-framework/issues/79) Fix ConvertTo-Seconds to output valid numeric data with multiple digits
* [#81](https://github.com/Icinga/icinga-powershell-framework/issues/81), [#82](https://github.com/Icinga/icinga-powershell-framework/issues/82) Fix error on EventLog initialising in case `Icinga for Windows` application is not registered on new machines * [#81](https://github.com/Icinga/icinga-powershell-framework/issues/81), [#82](https://github.com/Icinga/icinga-powershell-framework/issues/82) Fix error on EventLog initialising in case `Icinga for Windows` application is not registered on new machines
* [#84](https://github.com/Icinga/icinga-powershell-framework/issues/84), Fix conversion of `ConvertTo-Seconds` and `ConvertTo-SecondsFromIcingaThresholds` while the input value is `$null` * [#84](https://github.com/Icinga/icinga-powershell-framework/issues/84), Fix conversion of `ConvertTo-Seconds` and `ConvertTo-SecondsFromIcingaThresholds` while the input value is `$null`
* [#85](https://github.com/Icinga/icinga-powershell-framework/issues/85), Fix incorrect handling to empty service user password which was configured as empty `String` instead of `$null` `SecureString` object
## 1.1.2 (2020-07-01) ## 1.1.2 (2020-07-01)

View file

@ -472,8 +472,8 @@ function Start-IcingaAgentInstallWizard()
$ServicePass = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please enter the password for your service user' -Secure -Default 'v').answer; $ServicePass = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please enter the password for your service user' -Secure -Default 'v').answer;
$InstallerArguments += "-ServicePass $ServicePass"; $InstallerArguments += "-ServicePass $ServicePass";
} else { } else {
$ServicePass = ''; $ServicePass = $null
$InstallerArguments += "-ServicePass ''"; $InstallerArguments += '-ServicePass $null';
} }
} }
} else { } else {