diff -r 0ae1b281a884 -r af0f6ec48de3 plugins/SpecialUserPrefs.php
--- a/plugins/SpecialUserPrefs.php Mon Sep 17 11:52:58 2007 -0400
+++ b/plugins/SpecialUserPrefs.php Tue Sep 18 00:30:43 2007 -0400
@@ -214,7 +214,14 @@
{
// Perform checks
if ( strlen($newpass) < 6 )
- $errors .= '
Password must be at least 6 characters. You hacked my script, darn you!
';
+ $errors .= 'Password must be at least 6 characters. You hacked my script, darn you!
';
+ if ( getConfig('pw_strength_enable') == '1' )
+ {
+ $score_inp = password_score($newpass);
+ $score_min = intval( getConfig('pw_strength_minimum') );
+ if ( $score_inp < $score_min )
+ $errors .= 'Your password did not meet the complexity score requirement for this site. Your password scored '. $score_inp .', while a score of at least '. $score_min .' is needed.
';
+ }
// Encrypt new password
if ( empty($errors) )
{
@@ -304,6 +311,12 @@
break;
case 'EmailPassword':
+ $errors = trim($errors);
+ if ( !empty($errors) )
+ {
+ echo $errors;
+ }
+
echo '