Fixed Linphone Provisioning URL Error for HTTP Authentication. (#7654)

This commit is contained in:
Takanobu Fuse
2025-12-10 00:52:02 +09:00
committed by GitHub
parent 6b063f2c28
commit 1c2f2aaae2

View File

@@ -919,8 +919,17 @@
//build content for linphone //build content for linphone
if ($device_template == "linphone/default") { if ($device_template == "linphone/default") {
$auth_string = ''; $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; $content = "https://".$auth_string.$provision_domain_name.'/app/provision/index.php?address='.$device_address;
} }