From a157b8c3a150505c51e6280459c6fc8b96fba7ac Mon Sep 17 00:00:00 2001 From: Marcus Nitzschke Date: Mon, 25 Dec 2023 06:26:15 +0100 Subject: [PATCH] Trim whitespace of username --- lib/Services/ApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Services/ApiService.php b/lib/Services/ApiService.php index 5bbebfe..2299804 100644 --- a/lib/Services/ApiService.php +++ b/lib/Services/ApiService.php @@ -49,7 +49,7 @@ public function sendRequest(string $path, string $description) { } if ($this->server['type'] == 'myopenhab') { - curl_setopt($ch, CURLOPT_USERPWD, $this->server['username'] . ':' . $this->server['password']); + curl_setopt($ch, CURLOPT_USERPWD, trim($this->server['username']) . ':' . $this->server['password']); } $this->logger->debug($description . " - request send", curl_getinfo($ch));