From ceb9480669bcb2027270c0966bd8598136f4cf81 Mon Sep 17 00:00:00 2001 From: Christoph Hofmann Date: Sun, 25 Feb 2024 20:59:30 +0100 Subject: [PATCH] Fixed sonarqube security hotspot Signed-off-by: Christoph Hofmann --- src/openHAB.Core.Client/Connection/ConnectionService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openHAB.Core.Client/Connection/ConnectionService.cs b/src/openHAB.Core.Client/Connection/ConnectionService.cs index cef11dbc..dd184c3b 100644 --- a/src/openHAB.Core.Client/Connection/ConnectionService.cs +++ b/src/openHAB.Core.Client/Connection/ConnectionService.cs @@ -34,9 +34,9 @@ public ConnectionService(OpenHABHttpClient openHABHttpClient, ILogger - public Models.Connection CurrentConnection + public Models.Connection CurrentConnection { - get => _connection; + get => _connection; } /// @@ -167,7 +167,7 @@ public async Task> GetOpenHABServerInfo(Models.Co return new HttpResponseResult(serverInfo, result.StatusCode); } - string runtimeversion = Regex.Replace(apiInfo?.RuntimeInfo.Version, "[^.0-9]", string.Empty); + string runtimeversion = Regex.Replace(apiInfo?.RuntimeInfo.Version, "[^.0-9]", string.Empty, RegexOptions.CultureInvariant, TimeSpan.FromSeconds(1)); if (!Version.TryParse(runtimeversion, out Version serverVersion)) { string message = "Not able to parse runtime version from openHAB server";