01tonythomas has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/120025

Change subject: Minimum password length for new account set to 8
......................................................................

Minimum password length for new account set to 8

To meet standards, the default value of Minimum Password length
is increased to 8. A message will be shown near the Password field
that the user should enter a password of minimum length. Affects
both the Create Account page and User Login page.

Bug: 3348
Change-Id: Ia8d7d67b020828cabf6b10e7c8c1d758097dfb1b
---
M includes/DefaultSettings.php
M includes/templates/Usercreate.php
M includes/templates/Userlogin.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
5 files changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/120025/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c6ebb35..40d684d 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3975,7 +3975,7 @@
  * Specifies the minimal length of a user password. If set to 0, empty pass-
  * words are allowed.
  */
-$wgMinimalPasswordLength = 1;
+$wgMinimalPasswordLength = 8;
 
 /**
  * Specifies if users should be sent to a password-reset form on login, if 
their
diff --git a/includes/templates/Usercreate.php 
b/includes/templates/Usercreate.php
index d1aef1d..75b2fd3 100644
--- a/includes/templates/Usercreate.php
+++ b/includes/templates/Usercreate.php
@@ -109,7 +109,8 @@
                        </div>
 
                        <div class="mw-row-password">
-                               <label for='wpPassword2'><?php $this->msg( 
'userlogin-yourpassword' ); ?></label>
+                               <label for='wpPassword2'><?php global 
$wgMinimalPasswordLength;
+                               echo $this->getMsg( 'userlogin-yourpassword' 
)->numParams( $wgMinimalPasswordLength )->escaped(); ?></label>
                                <?php
                                echo Html::input( 'wpPassword', null, 
'password', array(
                                        'class' => 'mw-input loginPassword',
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index 29908d7..6dbffe2 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -87,8 +87,8 @@
                        <div>
                                <label for='wpPassword1'>
                                        <?php
-                                       $this->msg( 'userlogin-yourpassword' );
-
+                                       global $wgMinimalPasswordLength;
+                                       echo $this->getMsg( 
'userlogin-yourpassword' )->numParams( $wgMinimalPasswordLength )->escaped();
                                        if ( $this->data['useemail'] && 
$this->data['canreset'] && $this->data['resetlink'] === true ) {
                                                echo ' ' . Linker::link(
                                                        
SpecialPage::getTitleFor( 'PasswordReset' ),
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 222333b..4e8cdf5 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1098,7 +1098,7 @@
 'createacct-another-username-ph'  => 'Enter the username',
 'createacct-helpusername'         => '', # do not translate or duplicate this 
message to other languages
 'yourpassword'                    => 'Password:',
-'userlogin-yourpassword'          => 'Password',
+'userlogin-yourpassword'          => 'Password (minimum $1 characters)',
 'userlogin-yourpassword-ph'       => 'Enter your password',
 'createacct-yourpassword-ph'      => 'Enter a password',
 'yourpasswordagain'               => 'Retype password:',
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index f3c762c..522839d 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -1265,7 +1265,8 @@
 'yourpassword' => 'In user preferences
 
 {{Identical|Password}}',
-'userlogin-yourpassword' => 'In login & create account forms, label for 
password field.
+'userlogin-yourpassword' => 'In login & create account forms, label for 
password field. Parameters:
+* $1 - minimum number of characters required for password.
 
 See examples: [[Special:UserLogin]] and 
[{{canonicalurl:Special:UserLogin|type=signup}} Special:UserLogin?type=signup]
 {{Identical|Password}}',

-- 
To view, visit https://gerrit.wikimedia.org/r/120025
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8d7d67b020828cabf6b10e7c8c1d758097dfb1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to