fixed handling of https and $cfg['ForceSSL'] (bug #1379491)
This commit is contained in:
@@ -9,6 +9,8 @@ $Source$
|
||||
* libraries/Config.class.php:
|
||||
- added check is_readable for user config file
|
||||
- check config file also on wakeup (bug #1376522)
|
||||
* libraries/Config.class.php, libraries/common.lib.php:
|
||||
fixed handling of https and $cfg['ForceSSL'] (bug #1379491)
|
||||
|
||||
2005-12-14 Michal Čihař <michal@cihar.com>
|
||||
* libraries/config.default.php, Documentation.html: Transliterate invalid
|
||||
|
@@ -66,6 +66,8 @@ class PMA_Config
|
||||
|
||||
// other settings, independant from config file, comes in
|
||||
$this->checkSystem();
|
||||
|
||||
$this->checkIsHttps();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -283,6 +285,11 @@ class PMA_Config
|
||||
$this->checkSystem();
|
||||
}
|
||||
|
||||
// check for https needs to be done everytime,
|
||||
// as https and http uses same session so this info can not be stored
|
||||
// in session
|
||||
$this->checkIsHttps();
|
||||
|
||||
$this->checkCollationConnection();
|
||||
}
|
||||
|
||||
@@ -653,11 +660,7 @@ class PMA_Config
|
||||
*/
|
||||
function isHttps()
|
||||
{
|
||||
static $is_https = null;
|
||||
|
||||
if ( null !== $is_https ) {
|
||||
return $is_https;
|
||||
}
|
||||
$is_https = false;
|
||||
|
||||
$url = array();
|
||||
|
||||
|
@@ -2788,6 +2788,20 @@ if (!defined('PMA_MINIMUM_COMMON')) {
|
||||
// BC
|
||||
$_SESSION['PMA_Config']->enableBc();
|
||||
|
||||
|
||||
/**
|
||||
* check https connection
|
||||
*/
|
||||
if ($_SESSION['PMA_Config']->get('ForceSSL')
|
||||
&& !$_SESSION['PMA_Config']->get('is_https')) {
|
||||
PMA_sendHeaderLocation(
|
||||
preg_replace('/^http/', 'https',
|
||||
$_SESSION['PMA_Config']->get('PmaAbsoluteUri'))
|
||||
. PMA_generate_common_url($_GET));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* loading language file LABEL_loading_language_file */
|
||||
|
||||
@@ -2909,18 +2923,6 @@ if (!defined('PMA_MINIMUM_COMMON')) {
|
||||
*/
|
||||
require_once './libraries/string.lib.php';
|
||||
|
||||
/**
|
||||
* check https connection
|
||||
*/
|
||||
if ($_SESSION['PMA_Config']->get('ForceSSL')
|
||||
&& !$_SESSION['PMA_Config']->get('is_https')) {
|
||||
PMA_sendHeaderLocation(
|
||||
preg_replace('/^http/', 'https',
|
||||
$_SESSION['PMA_Config']->get('PmaAbsoluteUri'))
|
||||
. PMA_generate_common_url($_GET));
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var array database list
|
||||
*/
|
||||
|
Reference in New Issue
Block a user