From 777a62af3544925401d855d5df9dbc1ea48da0ba Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 8 Apr 2024 22:48:59 +0900 Subject: [PATCH] Fix erroneous detection of SSL configration when importing very old XE configuration file --- common/framework/parsers/ConfigParser.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/common/framework/parsers/ConfigParser.php b/common/framework/parsers/ConfigParser.php index 21bcb1862..ecbe7ac93 100644 --- a/common/framework/parsers/ConfigParser.php +++ b/common/framework/parsers/ConfigParser.php @@ -198,7 +198,16 @@ class ConfigParser $config['url']['default'] = $default_url ?: (\RX_SSL ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . \RX_BASEURL; $config['url']['http_port'] = $db_info->http_port ?: null; $config['url']['https_port'] = $db_info->https_port ?: null; - $config['url']['ssl'] = ($db_info->use_ssl === 'none') ? 'none' : 'always'; + + // Convert SSL configuration. + if (isset($db_info->use_ssl) && in_array($db_info->use_ssl, ['always', 'optional'])) + { + $config['url']['ssl'] = 'always'; + } + else + { + $config['url']['ssl'] = 'none'; + } // Convert session configuration. $config['session']['delay'] = $db_info->delay_session === 'Y' ? true : false;