mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 22:40:39 +02:00
[ticket/sec-184] Do not output LDAP password to HTML
SECURITY-184
This commit is contained in:
@@ -567,6 +567,7 @@ class acp_board
|
|||||||
$old_auth_config = array();
|
$old_auth_config = array();
|
||||||
foreach ($auth_providers as $provider)
|
foreach ($auth_providers as $provider)
|
||||||
{
|
{
|
||||||
|
/** @var \phpbb\auth\provider\provider_interface $provider */
|
||||||
if ($fields = $provider->acp())
|
if ($fields = $provider->acp())
|
||||||
{
|
{
|
||||||
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
||||||
@@ -582,6 +583,14 @@ class acp_board
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (substr($field, -9) === '_password' && $cfg_array[$field] === '********')
|
||||||
|
{
|
||||||
|
// Do not update password fields if the content is ********,
|
||||||
|
// because that is the password replacement we use to not
|
||||||
|
// send the password to the output
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$old_auth_config[$field] = $this->new_config[$field];
|
$old_auth_config[$field] = $this->new_config[$field];
|
||||||
$config_value = $cfg_array[$field];
|
$config_value = $cfg_array[$field];
|
||||||
$this->new_config[$field] = $config_value;
|
$this->new_config[$field] = $config_value;
|
||||||
|
@@ -289,7 +289,6 @@ class ldap extends \phpbb\auth\provider\base
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function acp()
|
public function acp()
|
||||||
{
|
{
|
||||||
// These are fields required in the config table
|
// These are fields required in the config table
|
||||||
@@ -308,7 +307,7 @@ class ldap extends \phpbb\auth\provider\base
|
|||||||
'TEMPLATE_VARS' => array(
|
'TEMPLATE_VARS' => array(
|
||||||
'AUTH_LDAP_BASE_DN' => $new_config['ldap_base_dn'],
|
'AUTH_LDAP_BASE_DN' => $new_config['ldap_base_dn'],
|
||||||
'AUTH_LDAP_EMAIL' => $new_config['ldap_email'],
|
'AUTH_LDAP_EMAIL' => $new_config['ldap_email'],
|
||||||
'AUTH_LDAP_PASSORD' => $new_config['ldap_password'],
|
'AUTH_LDAP_PASSORD' => $new_config['ldap_password'] !== '' ? '********' : '',
|
||||||
'AUTH_LDAP_PORT' => $new_config['ldap_port'],
|
'AUTH_LDAP_PORT' => $new_config['ldap_port'],
|
||||||
'AUTH_LDAP_SERVER' => $new_config['ldap_server'],
|
'AUTH_LDAP_SERVER' => $new_config['ldap_server'],
|
||||||
'AUTH_LDAP_UID' => $new_config['ldap_uid'],
|
'AUTH_LDAP_UID' => $new_config['ldap_uid'],
|
||||||
|
Reference in New Issue
Block a user