From c5a3753dd2059b853b19a9e97d996b256791f7d2 Mon Sep 17 00:00:00 2001 From: robnielsen Date: Mon, 19 Feb 2024 07:46:53 -0600 Subject: [PATCH] [insteon] redact password from thing status and log file when hub initialization fails (#16075) Signed-off-by: Rob Nielsen --- .../insteon/internal/handler/InsteonNetworkHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/handler/InsteonNetworkHandler.java b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/handler/InsteonNetworkHandler.java index 4ae66b63d4..e1f8d1d79c 100644 --- a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/handler/InsteonNetworkHandler.java +++ b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/handler/InsteonNetworkHandler.java @@ -25,6 +25,7 @@ import org.openhab.binding.insteon.internal.InsteonBinding; import org.openhab.binding.insteon.internal.config.InsteonNetworkConfiguration; import org.openhab.binding.insteon.internal.device.InsteonAddress; import org.openhab.binding.insteon.internal.discovery.InsteonDeviceDiscoveryService; +import org.openhab.binding.insteon.internal.utils.Utils; import org.openhab.core.io.console.Console; import org.openhab.core.io.transport.serial.SerialPortManager; import org.openhab.core.thing.Bridge; @@ -125,7 +126,7 @@ public class InsteonNetworkHandler extends BaseBridgeHandler { }, 0, DRIVER_INITIALIZED_TIME_IN_SECONDS, TimeUnit.SECONDS); } else { String msg = "Initialization failed, unable to start the Insteon bridge with the port '" - + config.getPort() + "'."; + + Utils.redactPassword(config.getPort()) + "'."; logger.warn(msg); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, msg); -- 2.47.3