BUG-14988 Administrative Interfaces are Accessible from the Internet SOLVED
This commit is contained in:
@@ -140,15 +140,31 @@ $_SESSION ['_DBArray'] = $_DBArray;
|
|||||||
$aField ['LOGIN_VERIFY_MSG'] = G::loadTranslation ('LOGIN_VERIFY_MSG');
|
$aField ['LOGIN_VERIFY_MSG'] = G::loadTranslation ('LOGIN_VERIFY_MSG');
|
||||||
$aField['USER_LANG'] = SYS_LANG;
|
$aField['USER_LANG'] = SYS_LANG;
|
||||||
|
|
||||||
//Get Server Configuration
|
|
||||||
//G::LoadClass ('serverConfiguration'); //already called
|
|
||||||
$oServerConf = & serverConf::getSingleton ();
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ();
|
$G_PUBLISH = new Publisher ();
|
||||||
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
if (!defined('ws_in_login')) {
|
||||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLoginNoWS', '', $aField, 'sysLogin');
|
define('ws_in_login', 'serverconf');
|
||||||
} else {
|
}
|
||||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLogin', '', $aField, 'sysLogin');
|
$fileLogin = 'login/sysLogin';
|
||||||
|
switch (ws_in_login) {
|
||||||
|
case 'serverconf':
|
||||||
|
//Get Server Configuration
|
||||||
|
$oServerConf = & serverConf::getSingleton ();
|
||||||
|
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
||||||
|
$fileLogin = 'login/sysLoginNoWS';
|
||||||
|
} else {
|
||||||
|
$fileLogin = 'login/sysLogin';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'no':
|
||||||
|
$fileLogin = 'login/sysLoginNoWS';
|
||||||
|
break;
|
||||||
|
case 'yes':
|
||||||
|
$fileLogin = 'login/sysLogin';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$fileLogin = 'login/sysLogin';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$G_PUBLISH->AddContent ('xmlform', 'xmlform', $fileLogin, '', $aField, 'sysLogin');
|
||||||
G::RenderPage ("publish");
|
G::RenderPage ("publish");
|
||||||
|
|||||||
@@ -316,6 +316,8 @@ define( 'MEMCACHED_ENABLED', $config['memcached'] );
|
|||||||
define( 'MEMCACHED_SERVER', $config['memcached_server'] );
|
define( 'MEMCACHED_SERVER', $config['memcached_server'] );
|
||||||
define( 'TIME_ZONE', $config['time_zone'] );
|
define( 'TIME_ZONE', $config['time_zone'] );
|
||||||
|
|
||||||
|
define ('ws_in_login', isset($config['ws_in_login']) ? $config['ws_in_login'] : 'serverconf');
|
||||||
|
|
||||||
// IIS Compatibility, SERVER_ADDR doesn't exist on that env, so we need to define it.
|
// IIS Compatibility, SERVER_ADDR doesn't exist on that env, so we need to define it.
|
||||||
$_SERVER['SERVER_ADDR'] = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : $_SERVER['SERVER_NAME'];
|
$_SERVER['SERVER_ADDR'] = isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : $_SERVER['SERVER_NAME'];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user