From 1c2f2aaae2dd5c29d2479df1e766923b4a0e2ab8 Mon Sep 17 00:00:00 2001 From: Takanobu Fuse Date: Wed, 10 Dec 2025 00:52:02 +0900 Subject: [PATCH] Fixed Linphone Provisioning URL Error for HTTP Authentication. (#7654) --- app/devices/device_edit.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 559144cba5..f546629cc8 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -919,8 +919,17 @@ //build content for linphone if ($device_template == "linphone/default") { $auth_string = ''; - if ($settings->get('provision', 'http_auth_enabled', true) && !empty($settings->get('provision', 'http_auth_username', '')) && !empty($settings->get('provision', 'http_auth_password', ''))) { - $auth_string = $settings->get('provision', 'http_auth_username', '').':'.$settings->get('provision', 'http_auth_password', '').'@'; + + $http_auth_password = $settings->get('provision', 'http_auth_password', ''); + + if (is_array($http_auth_password)) { + $http_auth_password = $http_auth_password[0]; + } + + $http_auth_username = $settings->get('provision', 'http_auth_username', ''); + + if ($settings->get('provision', 'http_auth_enabled', true) && !empty($http_auth_username) && !empty($http_auth_password)) { + $auth_string = $http_auth_username.':'.$http_auth_password.'@'; } $content = "https://".$auth_string.$provision_domain_name.'/app/provision/index.php?address='.$device_address; }