mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
some fixes.
David, could you check the pass_complex expressions? They are: .* PASS_TYPE_ANY (any characters are allowed, no check) [a-zA-Z] PASS_TYPE_CASE (password must contain alphanumerics) [a-zA-Z0-9] PASS_TYPE_ALPHA (password must contain alphanumerics and numbers) [a-zA-Z\W] PASS_TYPE_SYMBOL (password must contain alphanumers, numbers and symbols) At the moment the pass complexity check is done within validate_password(), but the expressions are wrong. :) git-svn-id: file:///svn/phpbb/trunk@6317 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -622,9 +622,11 @@ class acp_users
|
||||
$data['username'] = $data['user'];
|
||||
unset($data['user']);
|
||||
|
||||
// Validation data
|
||||
// Validation data - we do not check the password complexity setting here
|
||||
$var_ary = array(
|
||||
'user_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
'user_password' => array(
|
||||
array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
array('password')),
|
||||
'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
'warnings' => array('num'),
|
||||
);
|
||||
@@ -772,6 +774,7 @@ class acp_users
|
||||
}
|
||||
|
||||
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[\w]+' => 'USERNAME_ALPHA_ONLY', '[\w_\+\. \-\[\]]+' => 'USERNAME_ALPHA_SPACERS');
|
||||
$pass_char_ary = array('.*' => 'PASS_TYPE_ANY', '[a-zA-Z]' => 'PASS_TYPE_CASE', '[a-zA-Z0-9]' => 'PASS_TYPE_ALPHA', '[a-zA-Z\W]' => 'PASS_TYPE_SYMBOL');
|
||||
|
||||
if ($user_id == $user->data['user_id'])
|
||||
{
|
||||
@@ -794,8 +797,8 @@ class acp_users
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[$config['allow_name_chars']] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang['CHANGE_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
|
||||
'S_OVERVIEW' => true,
|
||||
|
Reference in New Issue
Block a user