aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xphpBB/install/install_install.php15
-rwxr-xr-xphpBB/language/en/install.php5
2 files changed, 18 insertions, 2 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index fe058b5e56..997c9ccf57 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -524,15 +524,28 @@ class install_install extends module
{
$error[] = $lang['INST_ERR_MISSING_DATA'];
}
+
if ($admin_pass1 != $admin_pass2 && $admin_pass1 != '')
{
$error[] = $lang['INST_ERR_PASSWORD_MISMATCH'];
}
+ // Test against the default password rules
+ if ($admin_pass1 != '' && strlen($admin_pass1) < 6)
+ {
+ $error[] = $lang['INST_ERR_PASSWORD_TOO_SHORT'];
+ }
+
+ if ($admin_pass1 != '' && strlen($admin_pass1) > 30)
+ {
+ $error[] = $lang['INST_ERR_PASSWORD_TOO_LONG'];
+ }
+
if ($board_email1 != $board_email2 && $board_email1 != '')
{
$error[] = $lang['INST_ERR_EMAIL_MISMATCH'];
}
+
if ($board_email1 != '' && !preg_match('#^[a-z0-9\.\-_\+]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $board_email1))
{
$error[] = $lang['INST_ERR_EMAIL_INVALID'];
@@ -1297,7 +1310,7 @@ class install_install extends module
'legend1' => 'ADMIN_CONFIG',
'language' => array('lang' => 'DEFAULT_LANG', 'type' => 'select', 'options' => '$this->module->inst_language_select(\'{VALUE}\')', 'explain' => false),
'admin_name' => array('lang' => 'ADMIN_USERNAME', 'type' => 'text:25:100', 'explain' => false),
- 'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => false),
+ 'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => true),
'admin_pass2' => array('lang' => 'ADMIN_PASSWORD_CONFIRM', 'type' => 'password:25:100', 'explain' => false),
'board_email1' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false),
'board_email2' => array('lang' => 'CONTACT_EMAIL_CONFIRM', 'type' => 'text:25:100', 'explain' => false),
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 336819d020..3d186b5cd9 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -32,6 +32,7 @@ $lang = array_merge($lang, array(
'ADMIN_CONFIG' => 'Admin Configuration',
'ADMIN_PASSWORD' => 'Administrator password',
'ADMIN_PASSWORD_CONFIRM' => 'Confirm administrator password',
+ 'ADMIN_PASSWORD_EXPLAIN' => '(Please enter a password between 6 and 30 characters is length)',
'ADMIN_TEST' => 'Check administrator settings',
'ADMIN_USERNAME' => 'Administrator username',
'APP_MAGICK' => 'Imagemagick support [ Attachments ]',
@@ -127,7 +128,9 @@ $lang = array_merge($lang, array(
'INST_ERR_FTP_LOGIN' => 'Could not login to ftp server, check your username and password',
'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block',
'INST_ERR_NO_DB' => 'Cannot load the PHP module for the selected database type',
- 'INST_ERR_PASSWORD_MISMATCH'=> 'The passwords you entered did not match.',
+ 'INST_ERR_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
+ 'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.',
+ 'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.',
'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
'NEXT_STEP' => 'Proceed to next step',