Fixes exception on Icinga Agent information fetching from registry

This commit is contained in:
Lord Hepipud 2026-01-30 16:49:17 +01:00
parent 07611cc8cc
commit dc16a5e657
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
### Bugfixes ### Bugfixes
* [#764](https://github.com/Icinga/icinga-powershell-framework/issues/764) Fixes an issue with the information fetching from the registry for the Icinga Agent, which can throw unhandled exceptions in case of malicious characters in the registry entries
* [#783](https://github.com/Icinga/icinga-powershell-framework/issues/783) Fixes possible FIPS exception on some Windows machines, caused by `MD5` hash algorithm used to verify the service binary file integrity after download instead of `SHA256` * [#783](https://github.com/Icinga/icinga-powershell-framework/issues/783) Fixes possible FIPS exception on some Windows machines, caused by `MD5` hash algorithm used to verify the service binary file integrity after download instead of `SHA256`
* [#814](https://github.com/Icinga/icinga-powershell-framework/pull/814) Fixes random chars function to truly generate unpredictable character sequences and to replace `Get-Random` which is not entirely secure * [#814](https://github.com/Icinga/icinga-powershell-framework/pull/814) Fixes random chars function to truly generate unpredictable character sequences and to replace `Get-Random` which is not entirely secure
* [#815](https://github.com/Icinga/icinga-powershell-framework/pull/815) Fixes a possible crash for `Test-IcingaAddTypeExist`, causing the Icinga for Windows installation to fail when third party components are checked which are malfunctioning * [#815](https://github.com/Icinga/icinga-powershell-framework/pull/815) Fixes a possible crash for `Test-IcingaAddTypeExist`, causing the Icinga for Windows installation to fail when third party components are checked which are malfunctioning

View file

@ -9,7 +9,7 @@ function Get-IcingaAgentInstallation()
$regPath = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'); $regPath = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*');
} }
$RegistryData = Get-ItemProperty $regPath; $RegistryData = Get-ItemProperty $regPath -ErrorAction SilentlyContinue;
$IcingaData = $null; $IcingaData = $null;
foreach ($entry in $RegistryData) { foreach ($entry in $RegistryData) {
if ($null -eq $entry -or $null -eq $entry.DisplayName) { if ($null -eq $entry -or $null -eq $entry.DisplayName) {