mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[ticket/sec-184] Do not output config passwords to the HTML page
SECURITY-184
This commit is contained in:
parent
db3782e491
commit
6ca3a30576
2 changed files with 14 additions and 2 deletions
|
@ -500,7 +500,7 @@ class acp_board
|
||||||
}
|
}
|
||||||
|
|
||||||
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
|
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
|
||||||
foreach ($display_vars['vars'] as $config_name => $null)
|
foreach ($display_vars['vars'] as $config_name => $data)
|
||||||
{
|
{
|
||||||
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
||||||
{
|
{
|
||||||
|
@ -532,6 +532,13 @@ class acp_board
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
|
if (strpos($data['type'], 'password') === 0 && $config_value === '********')
|
||||||
|
{
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
set_config($config_name, $config_value);
|
set_config($config_name, $config_value);
|
||||||
|
|
||||||
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
||||||
|
|
|
@ -245,8 +245,13 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||||
|
|
||||||
switch ($tpl_type[0])
|
switch ($tpl_type[0])
|
||||||
{
|
{
|
||||||
case 'text':
|
|
||||||
case 'password':
|
case 'password':
|
||||||
|
if ($new[$config_key] !== '')
|
||||||
|
{
|
||||||
|
// replace passwords with asterixes
|
||||||
|
$new[$config_key] = '********';
|
||||||
|
}
|
||||||
|
case 'text':
|
||||||
case 'url':
|
case 'url':
|
||||||
case 'email':
|
case 'email':
|
||||||
case 'color':
|
case 'color':
|
||||||
|
|
Loading…
Add table
Reference in a new issue