List:Commits« Previous MessageNext Message »
From:Ashish Agarwal Date:May 10 2012 10:57am
Subject:bzr push into mysql-trunk branch (ashish.y.agarwal:3883 to 3884)
View as plain text  
 3884 Ashish Agarwal	2012-05-10
      wl2739: Auditing Password Security
              Impementing review comments.

    removed:
      plugin/password_validation/dictionary.txt
    added:
      include/mysql/service_password_string.h
      libservices/password_string_service.c
      sql/share/dictionary.txt
    modified:
      include/mysql/plugin.h
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      include/mysql/plugin_validate_password.h
      include/mysql/services.h
      include/service_versions.h
      libservices/CMakeLists.txt
      mysql-test/r/validate_password_plugin.result
      mysql-test/t/validate_password_plugin.test
      plugin/password_validation/CMakeLists.txt
      plugin/password_validation/validate_password.cc
      sql/item_func.cc
      sql/share/CMakeLists.txt
      sql/sql_acl.cc
      sql/sql_plugin.h
      sql/sql_plugin_services.h
      support-files/CMakeLists.txt
      support-files/my-huge.cnf.sh
      support-files/my-large.cnf.sh
      support-files/my-medium.cnf.sh
      support-files/my-small.cnf.sh
 3883 Ashish Agarwal	2012-05-03
      wl2739: Test case fails in linux due to dictionary
              file.

    modified:
      plugin/password_validation/CMakeLists.txt
=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h	2012-04-17 07:12:21 +0000
+++ b/include/mysql/plugin.h	2012-05-10 10:54:37 +0000
@@ -73,7 +73,7 @@ typedef struct st_mysql_xid MYSQL_XID;
   Plugin API. Common for all plugin types.
 */
 
-#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0103
+#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104
 
 /*
   The allowable types of plugins

=== modified file 'include/mysql/plugin_audit.h.pp'
--- a/include/mysql/plugin_audit.h.pp	2012-03-01 13:53:55 +0000
+++ b/include/mysql/plugin_audit.h.pp	2012-05-10 10:54:37 +0000
@@ -73,6 +73,21 @@ extern struct my_plugin_log_service
 } *my_plugin_log_service;
 int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
                           const char *format, ...);
+#include <mysql/service_password_string.h>
+struct password_char_case
+{
+  size_t has_numbers;
+  size_t has_lower;
+  size_t has_upper;
+  size_t has_special_chars;
+};
+typedef struct password_char_case PASSWORD_CHAR_CASE;
+extern struct password_string_service_st {
+  void (*password_string_case_type)(PASSWORD_CHAR_CASE *, void *);
+  const char *(*password_string_casedn_type)(void *);
+} *password_string_service;
+void password_string_case(PASSWORD_CHAR_CASE *chars_case, void *password);
+const char *password_string_casedn(void *password);
 struct st_mysql_xid {
   long formatID;
   long gtrid_length;

=== modified file 'include/mysql/plugin_auth.h.pp'
--- a/include/mysql/plugin_auth.h.pp	2012-03-01 13:53:55 +0000
+++ b/include/mysql/plugin_auth.h.pp	2012-05-10 10:54:37 +0000
@@ -73,6 +73,21 @@ extern struct my_plugin_log_service
 } *my_plugin_log_service;
 int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
                           const char *format, ...);
+#include <mysql/service_password_string.h>
+struct password_char_case
+{
+  size_t has_numbers;
+  size_t has_lower;
+  size_t has_upper;
+  size_t has_special_chars;
+};
+typedef struct password_char_case PASSWORD_CHAR_CASE;
+extern struct password_string_service_st {
+  void (*password_string_case_type)(PASSWORD_CHAR_CASE *, void *);
+  const char *(*password_string_casedn_type)(void *);
+} *password_string_service;
+void password_string_case(PASSWORD_CHAR_CASE *chars_case, void *password);
+const char *password_string_casedn(void *password);
 struct st_mysql_xid {
   long formatID;
   long gtrid_length;

=== modified file 'include/mysql/plugin_ftparser.h.pp'
--- a/include/mysql/plugin_ftparser.h.pp	2012-03-01 13:53:55 +0000
+++ b/include/mysql/plugin_ftparser.h.pp	2012-05-10 10:54:37 +0000
@@ -73,6 +73,21 @@ extern struct my_plugin_log_service
 } *my_plugin_log_service;
 int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
                           const char *format, ...);
+#include <mysql/service_password_string.h>
+struct password_char_case
+{
+  size_t has_numbers;
+  size_t has_lower;
+  size_t has_upper;
+  size_t has_special_chars;
+};
+typedef struct password_char_case PASSWORD_CHAR_CASE;
+extern struct password_string_service_st {
+  void (*password_string_case_type)(PASSWORD_CHAR_CASE *, void *);
+  const char *(*password_string_casedn_type)(void *);
+} *password_string_service;
+void password_string_case(PASSWORD_CHAR_CASE *chars_case, void *password);
+const char *password_string_casedn(void *password);
 struct st_mysql_xid {
   long formatID;
   long gtrid_length;

=== modified file 'include/mysql/plugin_validate_password.h'
--- a/include/mysql/plugin_validate_password.h	2012-05-02 08:59:24 +0000
+++ b/include/mysql/plugin_validate_password.h	2012-05-10 10:54:37 +0000
@@ -1,5 +1,4 @@
-#ifndef MYSQL_PLUGIN_VALIDATE_PASSWORD_INCLUDED
-/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -14,16 +13,18 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
+#ifndef MYSQL_PLUGIN_VALIDATE_PASSWORD_INCLUDED
+#define MYSQL_PLUGIN_VALIDATE_PASSWORD_INCLUDED
 /*************************************************************************
   API for validate_password plugin. (MYSQL_VALIDATE_PASSWORD_PLUGIN)
 */
-#define MYSQL_PLUGIN_VALIDATE_PASSWORD_INCLUDED
 
 #include <mysql/plugin.h>
-#include <sql_string.h>
 
 #define MYSQL_VALIDATE_PASSWORD_INTERFACE_VERSION 0x0100
 
+typedef void* string_handle;
+
 /*************************************************************************
   The descriptor structure for the plugin, that is referred from
   st_mysql_plugin.
@@ -31,17 +32,17 @@
 
 struct st_mysql_validate_password
 {
-  int interface_version;                    /* version plugin uses */
+  int interface_version;
   /**
     This function retuns TRUE for passwords which satisfy the password
     policy (as choosen by plugin variable) and FALSE for all other
     password
   */
-  bool (*validate_password)(String *password);
+  int (*validate_password)(string_handle password, size_t password_length);
   /**
-    This function returns the highest policy number which the password
-    satisfy.
+    This function returns the password strength (0-100) depending
+    upon the policies
   */
-  uint (*validate_password_strength)(String *password);
+  int (*get_password_strength)(string_handle password, size_t password_length);
 };
 #endif

=== added file 'include/mysql/service_password_string.h'
--- a/include/mysql/service_password_string.h	1970-01-01 00:00:00 +0000
+++ b/include/mysql/service_password_string.h	2012-05-10 10:54:37 +0000
@@ -0,0 +1,76 @@
+/* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
+
+/**
+  @file
+  This service provides functions to parse password String
+*/
+
+#ifndef MYSQL_SERVICE_PASSWORD_STRING_INCLUDED
+#define MYSQL_SERVICE_PASSWORD_STRING_INCLUDED
+
+#ifndef MYSQL_ABI_CHECK
+#include <stdlib.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct password_char_case
+{
+  size_t has_numbers;
+  size_t has_lower;
+  size_t has_upper;
+  size_t has_special_chars;
+};
+
+typedef struct password_char_case PASSWORD_CHAR_CASE;
+
+extern struct password_string_service_st {
+  void (*password_string_case_type)(PASSWORD_CHAR_CASE *, void *);
+  const char *(*password_string_casedn_type)(void *);
+} *password_string_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define password_string_case(chars_case, password) \
+        password_string_service->password_string_case_type \
+        (chars_case, password)
+#define password_string_casedn(password) \
+        password_string_service->password_string_casedn_type(password)
+#else
+
+/**
+   It takes password string and calculate the number of uppercase,
+   lowercase, digits and special character. stores the value in
+   PASSWORD_CHAR_CASE. Support mysql character sets.
+*/ 
+void password_string_case(PASSWORD_CHAR_CASE *chars_case, void *password);
+
+/**
+   It converts the uppercase into lowercase based on the
+   character set
+*/
+const char *password_string_casedn(void *password);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

=== modified file 'include/mysql/services.h'
--- a/include/mysql/services.h	2011-06-30 15:50:45 +0000
+++ b/include/mysql/services.h	2012-05-10 10:54:37 +0000
@@ -23,6 +23,7 @@ extern "C" {
 #include <mysql/service_thd_wait.h>
 #include <mysql/service_thread_scheduler.h>
 #include <mysql/service_my_plugin_log.h>
+#include <mysql/service_password_string.h>
 
 #ifdef __cplusplus
 }

=== modified file 'include/service_versions.h'
--- a/include/service_versions.h	2011-06-30 15:50:45 +0000
+++ b/include/service_versions.h	2012-05-10 10:54:37 +0000
@@ -24,3 +24,4 @@
 #define VERSION_thd_wait        0x0100
 #define VERSION_my_thread_scheduler 0x0100
 #define VERSION_my_plugin_log 0x0100
+#define VERSION_password_string  0x0100

=== modified file 'libservices/CMakeLists.txt'
--- a/libservices/CMakeLists.txt	2011-06-30 15:50:45 +0000
+++ b/libservices/CMakeLists.txt	2012-05-10 10:54:37 +0000
@@ -20,7 +20,8 @@ SET(MYSQLSERVICES_SOURCES
   thd_alloc_service.c
   thd_wait_service.c
   my_plugin_log_service.c
-  my_thread_scheduler_service.c)
+  my_thread_scheduler_service.c
+  password_string_service.c)
 
 ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
 INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)

=== added file 'libservices/password_string_service.c'
--- a/libservices/password_string_service.c	1970-01-01 00:00:00 +0000
+++ b/libservices/password_string_service.c	2012-05-10 10:54:37 +0000
@@ -0,0 +1,18 @@
+/*  Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
+    
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; version 2 of the
+    License.
+    
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#include <service_versions.h>
+SERVICE_VERSION *password_string_service= (void*)VERSION_password_string;

=== modified file 'mysql-test/r/validate_password_plugin.result'
--- a/mysql-test/r/validate_password_plugin.result	2012-04-30 06:36:01 +0000
+++ b/mysql-test/r/validate_password_plugin.result	2012-05-10 10:54:37 +0000
@@ -1,9 +1,6 @@
-CALL mtr.add_suppression("dictionary file not found");
-CALL mtr.add_suppression("dictionary file size too large");
 CREATE USER 'base_user'@'localhost' IDENTIFIED BY '';
+GRANT ALL ON mysql.* TO 'user'@'localhost' IDENTIFIED BY 'password';
 INSTALL PLUGIN validate_password SONAME 'validate_password.so';
-INSTALL PLUGIN validate_password SONAME 'validate_password.so';
-ERROR HY000: Function 'validate_password' already exists
 # password policy low (which only check for password length)
 # default case: password length should be minimum 8
 SET @@global.validate_password_policy_number= 1;
@@ -38,6 +35,7 @@ GRANT USAGE ON *.* TO 'base_user'@'local
 SET @@global.validate_password_special_char_count= 1;
 # password policy strong
 # default_file : dictionary.txt
+SET@@global.validate_password_dictionary_file='/home/ashish/mysql-rp/mysql-trunk-wl2739/sql/share//dictionary.txt';
 SET @@global.validate_password_policy_number= 3;
 CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
 ERROR HY000: not a valid password 'password'
@@ -45,7 +43,9 @@ SET PASSWORD FOR 'base_user'@'localhost'
 ERROR HY000: not a valid password 'password1a#'
 UPDATE mysql.user SET PASSWORD= PASSWORD('pass12345A#') WHERE user='base_user';
 ERROR HY000: not a valid password 'pass12345a#'
-GRANT USAGE ON *.* TO 'base_user'@'localhost' IDENTIFIED BY 'PA12wrd!#';
+UPDATE mysql.user SET PASSWORD= PASSWORD('pass0000A#') WHERE user='base_user';
+ERROR HY000: not a valid password 'pass0000a#'
+GRANT USAGE ON *.* TO 'base_user'@'localhost' IDENTIFIED BY 'PA00wrd!#';
 # test for password_validate_strength function
 SELECT VALIDATE_PASSWORD_STRENGTH('password', 0);
 ERROR 42000: Incorrect parameter count in the call to native function 'VALIDATE_PASSWORD_STRENGTH'
@@ -56,30 +56,48 @@ VALIDATE_PASSWORD_STRENGTH('')
 0
 SELECT VALIDATE_PASSWORD_STRENGTH('pass');
 VALIDATE_PASSWORD_STRENGTH('pass')
-0
+25
 SELECT VALIDATE_PASSWORD_STRENGTH('password');
 VALIDATE_PASSWORD_STRENGTH('password')
-1
+50
+SELECT VALIDATE_PASSWORD_STRENGTH('password0000');
+VALIDATE_PASSWORD_STRENGTH('password0000')
+50
 SELECT VALIDATE_PASSWORD_STRENGTH('password1A#');
 VALIDATE_PASSWORD_STRENGTH('password1A#')
-2
-SELECT VALIDATE_PASSWORD_STRENGTH('PA12wrd!#');
-VALIDATE_PASSWORD_STRENGTH('PA12wrd!#')
-3
-SET NAMES 'ujis';
+75
 SELECT VALIDATE_PASSWORD_STRENGTH('PA12wrd!#');
 VALIDATE_PASSWORD_STRENGTH('PA12wrd!#')
-3
-UNINSTALL PLUGIN validate_password;
-# restarting the server with no dictionary file.
-# Restart server.
-INSTALL PLUGIN validate_password SONAME 'validate_password.so';
-SET @@global.validate_password_policy_number= 3;
+100
+SELECT VALIDATE_PASSWORD_STRENGTH('PA00wrd!#');
+VALIDATE_PASSWORD_STRENGTH('PA00wrd!#')
+100
+SET @@global.validate_password_dictionary_file='NULL';
 # same password was not accepted as it was present in the dictionary file
 SET PASSWORD FOR 'base_user'@'localhost'= PASSWORD('password1A#');
-# As no dictionary file is present password strength is 3
 SELECT VALIDATE_PASSWORD_STRENGTH('password1A#');
 VALIDATE_PASSWORD_STRENGTH('password1A#')
-3
+100
+SET NAMES 'ujis';
+SELECT VALIDATE_PASSWORD_STRENGTH('PA12wrd!#');
+VALIDATE_PASSWORD_STRENGTH('PA12wrd!#')
+100
+SET @@global.validate_password_policy_number= 2;
+SET @@global.validate_password_policy_number= 1;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SET @@global.validate_password_length= 4;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SET @@global.validate_password_special_char_count= 0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+SET @@global.validate_password_mixed_case_count= 0;
+ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
+UPDATE mysql.user SET PASSWORD= PASSWORD('password') WHERE user='user';
+ERROR HY000: not a valid password 'password'
+UPDATE mysql.user SET PASSWORD= PASSWORD('PA00wrd!#') WHERE user='user';
+CREATE USER 'user1'@'localhost' IDENTIFIED BY 'password';
+ERROR HY000: not a valid password 'password'
+CREATE USER 'user1'@'localhost' IDENTIFIED BY 'PA00wrd!#';
+DROP USER 'user1'@'localhost';
 DROP USER 'base_user'@'localhost';
+DROP USER 'user'@'localhost';
 UNINSTALL PLUGIN validate_password;

=== modified file 'mysql-test/t/validate_password_plugin.test'
--- a/mysql-test/t/validate_password_plugin.test	2012-05-03 09:25:12 +0000
+++ b/mysql-test/t/validate_password_plugin.test	2012-05-10 10:54:37 +0000
@@ -1,13 +1,14 @@
---source include/not_embedded.inc
 --source include/have_validate_password_plugin.inc
-CALL mtr.add_suppression("dictionary file not found");
-CALL mtr.add_suppression("dictionary file size too large");
+--source include/not_embedded.inc
 
+let $MYSQL_ERRMSG_BASEDIR=`select @@lc_messages_dir`;
+
+# Plugin not installed no password required
 CREATE USER 'base_user'@'localhost' IDENTIFIED BY '';
+GRANT ALL ON mysql.* TO 'user'@'localhost' IDENTIFIED BY 'password';
+
 --replace_regex /\.dll/.so/
 eval INSTALL PLUGIN validate_password SONAME '$VALIDATE_PASSWORD';
---error ER_UDF_EXISTS
-eval INSTALL PLUGIN validate_password SONAME '$VALIDATE_PASSWORD';
 
 # test for all the three password policy
 # policy: low= 1, medium= 2, strong= 3
@@ -53,6 +54,7 @@ SET @@global.validate_password_special_c
 # file should contain 1 word per line
 # error if substring of password is a dictionary word 
 
+eval SET@@global.validate_password_dictionary_file='$MYSQL_ERRMSG_BASEDIR/dictionary.txt';
 SET @@global.validate_password_policy_number= 3;
 --error ER_NOT_VALID_PASSWORD
 CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
@@ -60,8 +62,9 @@ CREATE USER 'user'@'localhost' IDENTIFIE
 SET PASSWORD FOR 'base_user'@'localhost'= PASSWORD('password1A#');
 --error ER_NOT_VALID_PASSWORD
 UPDATE mysql.user SET PASSWORD= PASSWORD('pass12345A#') WHERE user='base_user';
-GRANT USAGE ON *.* TO 'base_user'@'localhost' IDENTIFIED BY 'PA12wrd!#';
-
+--error ER_NOT_VALID_PASSWORD
+UPDATE mysql.user SET PASSWORD= PASSWORD('pass0000A#') WHERE user='base_user';
+GRANT USAGE ON *.* TO 'base_user'@'localhost' IDENTIFIED BY 'PA00wrd!#';
 
 --echo # test for password_validate_strength function
 
@@ -72,49 +75,48 @@ SELECT VALIDATE_PASSWORD_STRENGTH();
 SELECT VALIDATE_PASSWORD_STRENGTH('');
 SELECT VALIDATE_PASSWORD_STRENGTH('pass');
 SELECT VALIDATE_PASSWORD_STRENGTH('password');
+SELECT VALIDATE_PASSWORD_STRENGTH('password0000');
 SELECT VALIDATE_PASSWORD_STRENGTH('password1A#');
 SELECT VALIDATE_PASSWORD_STRENGTH('PA12wrd!#');
+SELECT VALIDATE_PASSWORD_STRENGTH('PA00wrd!#');
+
+SET @@global.validate_password_dictionary_file='NULL';
+--echo # same password was not accepted as it was present in the dictionary file
+
+SET PASSWORD FOR 'base_user'@'localhost'= PASSWORD('password1A#');
+SELECT VALIDATE_PASSWORD_STRENGTH('password1A#');
 
-# Multibyte character set that have greater size when converted
+# Test for multibyte character set that have greater size when converted
 # from uppercase to lowercase.
 
 SET NAMES 'ujis';
 SELECT VALIDATE_PASSWORD_STRENGTH('PA12wrd!#');
 
-UNINSTALL PLUGIN validate_password;
-
---echo # restarting the server with no dictionary file.
-
-# Write file to make mysql-test-run.pl wait for the server to stop
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
-# Request shutdown
--- send_shutdown
-
-# Call script that will poll the server waiting for it to disapear
--- source include/wait_until_disconnected.inc
-
---echo # Restart server.
---exec echo "restart:--loose-validate_password_dictionary_file='NO'" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
-# Turn on reconnect
---enable_reconnect
-
-# Call script that will poll the server waiting for it to be back online again
---source include/wait_until_connected_again.inc
-
-# Turn off reconnect again
---disable_reconnect
-
---replace_regex /\.dll/.so/
-eval INSTALL PLUGIN validate_password SONAME '$VALIDATE_PASSWORD';
-
-SET @@global.validate_password_policy_number= 3;
---echo # same password was not accepted as it was present in the dictionary file
-SET PASSWORD FOR 'base_user'@'localhost'= PASSWORD('password1A#');
+# default policy is set, all other plugin variables set to default
+# Test to ensure that only the privileged user can access the plugin variables
+SET @@global.validate_password_policy_number= 2;
 
---echo # As no dictionary file is present password strength is 3
-SELECT VALIDATE_PASSWORD_STRENGTH('password1A#');
+# New connection
+connect (plug_con,localhost,user,password);
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.validate_password_policy_number= 1;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.validate_password_length= 4;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.validate_password_special_char_count= 0;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET @@global.validate_password_mixed_case_count= 0;
+# user has the update/create privilege but needs to satisfy password policy
+# to update/create new account 
+--error ER_NOT_VALID_PASSWORD
+UPDATE mysql.user SET PASSWORD= PASSWORD('password') WHERE user='user';
+UPDATE mysql.user SET PASSWORD= PASSWORD('PA00wrd!#') WHERE user='user';
+--error ER_NOT_VALID_PASSWORD
+CREATE USER 'user1'@'localhost' IDENTIFIED BY 'password';
+CREATE USER 'user1'@'localhost' IDENTIFIED BY 'PA00wrd!#';
+DROP USER 'user1'@'localhost';
+connection default;
 
 DROP USER 'base_user'@'localhost';
+DROP USER 'user'@'localhost';
 UNINSTALL PLUGIN validate_password;

=== modified file 'plugin/password_validation/CMakeLists.txt'
--- a/plugin/password_validation/CMakeLists.txt	2012-05-03 11:38:32 +0000
+++ b/plugin/password_validation/CMakeLists.txt	2012-05-10 10:54:37 +0000
@@ -15,5 +15,3 @@
 
 MYSQL_ADD_PLUGIN(validate_password validate_password.cc
     MODULE_ONLY)
-CONFIGURE_FILE(dictionary.txt ${CMAKE_BINARY_DIR}/plugin/password_validation/dictionary.txt)
-INSTALL(FILES dictionary.txt DESTINATION ${INSTALL_PLUGINDIR})

=== removed file 'plugin/password_validation/dictionary.txt'
--- a/plugin/password_validation/dictionary.txt	2012-05-02 08:59:24 +0000
+++ b/plugin/password_validation/dictionary.txt	1970-01-01 00:00:00 +0000
@@ -1,3538 +0,0 @@
-0000
-1111
-123456
-12345
-password
-password1
-123456789
-12345678
-1234567890
-abc123
-computer
-tigger
-1234
-qwerty
-money
-carmen
-mickey
-secret
-summer
-internet
-a1b2c3
-service
-canada
-hello
-ranger
-shadow
-baseball
-donald
-harley
-hockey
-letmein
-maggie
-mike
-mustang
-snoopy
-buster
-dragon
-jordan
-michael
-michelle
-mindy
-patrick
-123abc
-andrew
-bear
-calvin
-changeme
-diamond
-fuckme
-fuckyou
-matthew
-miller
-tiger
-trustno1
-alex
-apple
-avalon
-brandy
-chelsea
-coffee
-falcon
-freedom
-gandalf
-green
-helpme
-linda
-magic
-merlin
-newyork
-soccer
-thomas
-wizard
-asdfgh
-bandit
-batman
-boris
-butthead
-dorothy
-eeyore
-fishing
-football
-george
-happy
-iloveyou
-jennifer
-jonathan
-love
-marina
-master
-missy
-monday
-monkey
-natasha
-ncc1701
-pamela
-pepper
-piglet
-poohbear
-pookie
-rabbit
-rachel
-rocket
-rose
-smile
-sparky
-spring
-steven
-success
-sunshine
-victoria
-whatever
-zapata
-8675309
-amanda
-andy
-angel
-august
-barney
-biteme
-boomer
-brian
-casey
-cowboy
-delta
-doctor
-fisher
-island
-john
-joshua
-karen
-marley
-orange
-please
-rascal
-richard
-sarah
-scooter
-shalom
-silver
-skippy
-stanley
-taylor
-welcome
-zephyr
-111111
-aaaaaa
-access
-albert
-alexander
-andrea
-anna
-anthony
-asdfjkl;
-ashley
-basketball
-beavis
-black
-bob
-booboo
-bradley
-brandon
-buddy
-caitlin
-camaro
-charlie
-chicken
-chris
-cindy
-cricket
-dakota
-dallas
-daniel
-david
-debbie
-dolphin
-elephant
-emily
-friend
-fucker
-ginger
-goodluck
-hammer
-heather
-iceman
-jason
-jessica
-jesus
-joseph
-jupiter
-justin
-kevin
-knight
-lacrosse
-lakers
-lizard
-madison
-mary
-mother
-muffin
-murphy
-nirvana
-paris
-pentium
-phoenix
-picture
-rainbow
-sandy
-saturn
-scott
-shannon
-shithead
-skeeter
-sophie
-special
-stephanie
-stephen
-steve
-sweetie
-teacher
-tennis
-test
-test123
-tommy
-topgun
-tristan
-wally
-william
-wilson
-1q2w3e
-654321
-666666
-a12345
-a1b2c3d4
-alpha
-amber
-angela
-angie
-archie
-asdf
-blazer
-bond007
-booger
-charles
-christin
-claire
-control
-danny
-david1
-dennis
-digital
-disney
-edward
-elvis
-felix
-flipper
-franklin
-frodo
-honda
-horses
-hunter
-indigo
-james
-jasper
-jeremy
-julian
-kelsey
-killer
-lauren
-marie
-maryjane
-matrix
-maverick
-mayday
-mercury
-mitchell
-morgan
-mountain
-niners
-nothing
-oliver
-peace
-peanut
-pearljam
-phantom
-popcorn
-princess
-psycho
-pumpkin
-purple
-randy
-rebecca
-reddog
-robert
-rocky
-roses
-salmon
-samson
-sharon
-sierra
-smokey
-startrek
-steelers
-stimpy
-sunflower
-superman
-support
-sydney
-techno
-walter
-willie
-willow
-winner
-ziggy
-zxcvbnm
-alaska
-alexis
-alice
-animal
-apples
-barbara
-benjamin
-billy
-blue
-bluebird
-bobby
-bonnie
-bubba
-camera
-chocolate
-clark
-claudia
-cocacola
-compton
-connect
-cookie
-cruise
-douglas
-dreamer
-dreams
-duckie
-eagles
-eddie
-einstein
-enter
-explorer
-faith
-family
-ferrari
-flamingo
-flower
-foxtrot
-francis
-freddy
-friday
-froggy
-giants
-gizmo
-global
-goofy
-happy1
-hendrix
-henry
-herman
-homer
-honey
-house
-houston
-iguana
-indiana
-insane
-inside
-irish
-ironman
-jake
-jasmin
-jeanne
-jerry
-joey
-justice
-katherine
-kermit
-kitty
-koala
-larry
-leslie
-logan
-lucky
-mark
-martin
-matt
-minnie
-misty
-mitch
-mouse
-nancy
-nascar
-nelson
-pantera
-parker
-penguin
-peter
-piano
-pizza
-prince
-punkin
-pyramid
-raymond
-robin
-roger
-rosebud
-route66
-royal
-running
-sadie
-sasha
-security
-sheena
-sheila
-skiing
-snapple
-snowball
-sparrow
-spencer
-spike
-star
-stealth
-student
-sunny
-sylvia
-tamara
-taurus
-teresa
-theresa
-thunderbird
-tigers
-tony
-toyota
-travel
-tuesday
-victory
-viper1
-wesley
-whisky
-winnie
-winter
-wolves
-xyz123
-zorro
-123123
-1234567
-696969
-888888
-Anthony
-Joshua
-Matthew
-Tigger
-aaron
-abby
-abcdef
-adidas
-adrian
-alfred
-arthur
-athena
-austin
-awesome
-badger
-bamboo
-beagle
-bears
-beatles
-beautiful
-beaver
-benny
-bigmac
-bingo
-bitch
-blonde
-boogie
-boston
-brenda
-bright
-bubba1
-bubbles
-buffy
-button
-buttons
-cactus
-candy
-captain
-carlos
-caroline
-carrie
-casper
-catch22
-chance
-charity
-charlotte
-cheese
-cheryl
-chloe
-chris1
-clancy
-compaq
-conrad
-cooper
-cooter
-copper
-cosmos
-cougar
-cracker
-crawford
-crystal
-curtis
-cyclone
-dance
-diablo
-dollars
-dookie
-dumbass
-dundee
-elizabeth
-eric
-europe
-farmer
-firebird
-fletcher
-fluffy
-france
-freak1
-friends
-fuckoff
-gabriel
-galaxy
-gambit
-garden
-garfield
-garnet
-genesis
-genius
-godzilla
-golfer
-goober
-grace
-greenday
-groovy
-grover
-guitar
-hacker
-harry
-hazel
-hector
-herbert
-horizon
-hornet
-howard
-icecream
-imagine
-impala
-jack
-janice
-jasmine
-jason1
-jeanette
-jeffrey
-jenifer
-jenni
-jesus1
-jewels
-joker
-julie
-julie1
-junior
-justin1
-kathleen
-keith
-kelly
-kelly1
-kennedy
-kevin1
-knicks
-larry1
-leonard
-lestat
-library
-lincoln
-lionking
-london
-louise
-lucky1
-lucy
-maddog
-margaret
-mariposa
-marlboro
-martin1
-marty
-master1
-mensuck
-mercedes
-metal
-midori
-mikey
-millie
-mirage
-molly
-monet
-money1
-monica
-monopoly
-mookie
-moose
-moroni
-music
-naomi
-nathan
-nguyen
-nicholas
-nicole
-nimrod
-october
-olive
-olivia
-online
-oscar
-oxford
-pacific
-painter
-peaches
-penelope
-pepsi
-petunia
-philip
-phoenix1
-photo
-pickle
-player
-poiuyt
-porsche
-porter
-puppy
-python
-quality
-raquel
-raven
-remember
-robbie
-robert1
-roman
-rugby
-runner
-russell
-ryan
-sailing
-sailor
-samantha
-savage
-scarlett
-school
-sean
-seven
-shadow1
-sheba
-shelby
-shit
-shoes
-simba
-simple
-skipper
-smiley
-snake
-snickers
-sniper
-snoopdog
-snowman
-sonic
-spitfire
-sprite
-spunky
-starwars
-station
-stella
-stingray
-storm
-stormy
-stupid
-sunny1
-sunrise
-surfer
-susan
-tammy
-tango
-tanya
-teddy1
-theboss
-theking
-thumper
-tina
-tintin
-tomcat
-trebor
-trevor
-tweety
-unicorn
-valentine
-valerie
-vanilla
-veronica
-victor
-vincent
-viper
-warrior
-warriors
-weasel
-wheels
-wilbur
-winston
-wisdom
-wombat
-xavier
-yellow
-zeppelin
-1111
-1212
-Andrew
-Family
-Friends
-Michael
-Michelle
-Snoopy
-abcd1234
-abcdefg
-abigail
-account
-adam
-alex1
-alice1
-allison
-alpine
-andre1
-andrea1
-angel1
-anita
-annette
-antares
-apache
-apollo
-aragorn
-arizona
-arnold
-arsenal
-asdfasdf
-asdfg
-asdfghjk
-avenger
-baby
-babydoll
-bailey
-banana
-barry
-basket
-batman1
-beaner
-beast
-beatrice
-bella
-bertha
-bigben
-bigdog
-biggles
-bigman
-binky
-biology
-bishop
-blondie
-bluefish
-bobcat
-bosco
-braves
-brazil
-bruce
-bruno
-brutus
-buffalo
-bulldog
-bullet
-bullshit
-bunny
-business
-butch
-butler
-butter
-california
-carebear
-carol
-carol1
-carole
-cassie
-castle
-catalina
-catherine
-cccccc
-celine
-center
-champion
-chanel
-chaos
-chelsea1
-chester1
-chicago
-chico
-christian
-christy
-church
-cinder
-colleen
-colorado
-columbia
-commander
-connie
-cookies
-cooking
-corona
-cowboys
-coyote
-craig
-creative
-cuddles
-cuervo
-cutie
-daddy
-daisy
-daniel1
-danielle
-davids
-death
-denis
-derek
-design
-destiny
-diana
-diane
-dickhead
-digger
-dodger
-donna
-dougie
-dragonfly
-dylan
-eagle
-eclipse
-electric
-emerald
-etoile
-excalibur
-express
-fender
-fiona
-fireman
-flash
-florida
-flowers
-foster
-francesco
-francine
-francois
-frank
-french
-fuckface
-gemini
-general
-gerald
-germany
-gilbert
-goaway
-golden
-goldfish
-goose
-gordon
-graham
-grant
-gregory
-gretchen
-gunner
-hannah
-harold
-harrison
-harvey
-hawkeye
-heaven
-heidi
-helen
-helena
-hithere
-hobbit
-ibanez
-idontknow
-integra
-ireland
-irene
-isaac
-isabel
-jackass
-jackie
-jackson
-jaguar
-jamaica
-japan
-jenny1
-jessie
-johan
-johnny
-joker1
-jordan23
-judith
-julia
-jumanji
-kangaroo
-karen1
-kathy
-keepout
-keith1
-kenneth
-kimberly
-kingdom
-kitkat
-kramer
-kristen
-laura
-laurie
-lawrence
-lawyer
-legend
-liberty
-light
-lindsay
-lindsey
-lisa
-liverpool
-lola
-lonely
-louis
-lovely
-loveme
-lucas
-madonna
-malcolm
-malibu
-marathon
-marcel
-maria1
-mariah
-mariah1
-marilyn
-mario
-marvin
-maurice
-maxine
-maxwell
-me
-meggie
-melanie
-melissa
-melody
-mexico
-michael1
-michele
-midnight
-mike1
-miracle
-misha
-mishka
-molly1
-monique
-montreal
-moocow
-moore
-morris
-mouse1
-mulder
-nautica
-nellie
-newton
-nick
-nirvana1
-nissan
-norman
-notebook
-ocean
-olivier
-ollie
-oranges
-oregon
-orion
-panda
-pandora
-panther
-passion
-patricia
-pearl
-peewee
-pencil
-penny
-people
-percy
-person
-peter1
-petey
-picasso
-pierre
-pinkfloyd
-polaris
-police
-pookie1
-poppy
-power
-predator
-preston
-q1w2e3
-queen
-queenie
-quentin
-ralph
-random
-rangers
-raptor
-reality
-redrum
-remote
-reynolds
-rhonda
-ricardo
-ricardo1
-ricky
-river
-roadrunner
-robinhood
-rocknroll
-rocky1
-ronald
-roxy
-ruthie
-sabrina
-sakura
-sally
-sampson
-samuel
-sandra
-santa
-sapphire
-scarlet
-scorpio
-scott1
-scottie
-scruffy
-seattle
-serena
-shanti
-shark
-shogun
-simon
-singer
-skull
-skywalker
-slacker
-smashing
-smiles
-snowflake
-snuffy
-soccer1
-soleil
-sonny
-spanky
-speedy
-spider
-spooky
-stacey
-star69
-start
-steven1
-stinky
-strawberry
-stuart
-sugar
-sundance
-superfly
-suzanne
-suzuki
-swimmer
-swimming
-system
-taffy
-tarzan
-teddy
-teddybear
-terry
-theatre
-thunder
-thursday
-tinker
-tootsie
-tornado
-tracy
-tricia
-trident
-trojan
-truman
-trumpet
-tucker
-turtle
-tyler
-utopia
-voyager
-warcraft
-warlock
-warren
-water
-wayne
-wendy
-williams
-willy
-winona
-woody
-woofwoof
-wrangler
-wright
-xfiles
-xxxxxx
-yankees
-yvonne
-zebra
-zenith
-zigzag
-zombie
-zxc123
-zxcvb
-000000
-007007
-11111
-11111111
-123321
-171717
-181818
-1a2b3c
-1chris
-4runner
-54321
-55555
-6969
-7777777
-789456
-88888888
-Alexis
-Bailey
-Charlie
-Chris
-Daniel
-Dragon
-Elizabeth
-HARLEY
-Heather
-Jennifer
-Jessica
-Jordan
-KILLER
-Nicholas
-Password
-Princess
-Purple
-Rebecca
-Robert
-Shadow
-Steven
-Summer
-Sunshine
-Superman
-Taylor
-Thomas
-Victoria
-abcd123
-abcde
-accord
-active
-africa
-airborne
-alfaro
-alicia
-aliens
-alina
-aline
-alison
-allen
-aloha
-alpha1
-althea
-altima
-amanda1
-amazing
-america
-amour
-anderson
-andre
-andrew1
-andromeda
-angels
-angie1
-annie
-anything
-apple1
-apple2
-applepie
-april
-aquarius
-ariane
-ariel
-arlene
-artemis
-asdf1234
-asdfjkl
-ashley1
-ashraf
-ashton
-asterix
-attila
-autumn
-avatar
-babes
-bambi
-barbie
-barney1
-barrett
-bball
-beaches
-beanie
-beans
-beauty
-becca
-belize
-belle
-belmont
-benji
-benson
-bernardo
-berry
-betsy
-betty
-bigboss
-bigred
-billy1
-birdie
-birthday
-biscuit
-bitter
-blackjack
-blah
-blanche
-blood
-blowjob
-blowme
-blueeyes
-blues
-bogart
-bombay
-boobie
-boots
-bootsie
-boxers
-brandi
-brent
-brewster
-bridge
-bronco
-bronte
-brooke
-brother
-bryan
-bubble
-buddha
-budgie
-burton
-butterfly
-byron
-calendar
-calvin1
-camel
-camille
-campbell
-camping
-cancer
-canela
-cannon
-carbon
-carnage
-carolyn
-carrot
-cascade
-catfish
-cathy
-catwoman
-cecile
-celica
-change
-chantal
-charger
-cherry
-chiara
-chiefs
-china
-chris123
-christ1
-christmas
-christopher
-chuck
-cindy1
-cinema
-civic
-claude
-clueless
-cobain
-cobra
-cody
-colette
-college
-colors
-colt45
-confused
-cool
-corvette
-cosmo
-country
-crusader
-cunningham
-cupcake
-cynthia
-dagger
-dammit
-dancer
-daphne
-darkstar
-darren
-darryl
-darwin
-deborah
-december
-deedee
-deeznuts
-delano
-delete
-demon
-denise
-denny
-desert
-deskjet
-detroit
-devil
-devine
-devon
-dexter
-dianne
-diesel
-director
-dixie
-dodgers
-doggy
-dollar
-dolly
-dominique
-domino
-dontknow
-doogie
-doudou
-downtown
-dragon1
-driver
-dude
-dudley
-dutchess
-dwight
-eagle1
-easter
-eastern
-edith
-edmund
-eight
-element
-elissa
-ellen
-elliot
-empire
-enigma
-enterprise
-erin
-escort
-estelle
-eugene
-evelyn
-explore
-family1
-fatboy
-felipe
-ferguson
-ferret
-ferris
-fireball
-fishes
-fishie
-flight
-florida1
-flowerpot
-forward
-freddie
-freebird
-freeman
-frisco
-fritz
-froggie
-froggies
-frogs
-fucku
-future
-gabby
-games
-garcia
-gaston
-gateway
-george1
-georgia
-german
-germany1
-getout
-ghost
-gibson
-giselle
-gmoney
-goblin
-goblue
-gollum
-grandma
-gremlin
-grizzly
-grumpy
-guess
-guitar1
-gustavo
-haggis
-haha
-hailey
-halloween
-hamilton
-hamlet
-hanna
-hanson
-happy123
-happyday
-hardcore
-harley1
-harriet
-harris
-harvard
-health
-heart
-heather1
-heather2
-hedgehog
-helene
-hello1
-hello123
-hellohello
-hermes
-heythere
-highland
-hilda
-hillary
-history
-hitler
-hobbes
-holiday
-holly
-honda1
-hongkong
-hootie
-horse
-hotrod
-hudson
-hummer
-huskies
-idiot
-iforget
-iloveu
-impact
-indonesia
-irina
-isabelle
-israel
-italia
-italy
-jackie1
-jacob
-jakey
-james1
-jamesbond
-jamie
-jamjam
-jeffrey1
-jennie
-jenny
-jensen
-jesse
-jesse1
-jester
-jethro
-jimbob
-jimmy
-joanna
-joelle
-john316
-jordie
-jorge
-josh
-journey
-joyce
-jubilee
-jules
-julien
-juliet
-junebug
-juniper
-justdoit
-karin
-karine
-karma
-katerina
-katie
-katie1
-kayla
-keeper
-keller
-kendall
-kenny
-ketchup
-kings
-kissme
-kitten
-kittycat
-kkkkkk
-kristi
-kristine
-labtec
-laddie
-ladybug
-lance
-laurel
-lawson
-leader
-leland
-lemon
-lester
-letter
-letters
-lexus1
-libra
-lights
-lionel
-little
-lizzy
-lolita
-lonestar
-longhorn
-looney
-loren
-lorna
-loser
-lovers
-loveyou
-lucia
-lucifer
-lucky14
-maddie
-madmax
-magic1
-magnum
-maiden
-maine
-management
-manson
-manuel
-marcus
-maria
-marielle
-marine
-marino
-marshall
-martha
-maxmax
-meatloaf
-medical
-megan
-melina
-memphis
-mermaid
-miami
-michel
-michigan
-mickey1
-microsoft
-mikael
-milano
-miles
-millenium
-million
-miranda
-miriam
-mission
-mmmmmm
-mobile
-monkey1
-monroe
-montana
-monty
-moomoo
-moonbeam
-morpheus
-motorola
-movies
-mozart
-munchkin
-murray
-mustang1
-nadia
-nadine
-napoleon
-nation
-national
-nestle
-newlife
-newyork1
-nichole
-nikita
-nikki
-nintendo
-nokia
-nomore
-normal
-norton
-noway
-nugget
-number9
-numbers
-nurse
-nutmeg
-ohshit
-oicu812
-omega
-openup
-orchid
-oreo
-orlando
-packard
-packers
-paloma
-pancake
-panic
-parola
-parrot
-partner
-pascal
-patches
-patriots
-paula
-pauline
-payton
-peach
-peanuts
-pedro1
-peggy
-perfect
-perry
-peterpan
-philips
-phillips
-phone
-pierce
-pigeon
-pink
-pioneer
-piper1
-pirate
-pisces
-playboy
-pluto
-poetry
-pontiac
-pookey
-popeye
-prayer
-precious
-prelude
-premier
-puddin
-pulsar
-pussy
-pussy1
-qwert
-qwerty12
-qwertyui
-rabbit1
-rachelle
-racoon
-rambo
-randy1
-ravens
-redman
-redskins
-reggae
-reggie
-renee
-renegade
-rescue
-revolution
-richard1
-richards
-richmond
-riley
-ripper
-robby
-roberts
-rock
-rocket1
-rockie
-rockon
-roger1
-rogers
-roland
-rommel
-rookie
-rootbeer
-rosie
-rufus
-rusty
-ruthless
-sabbath
-sabina
-safety
-saint
-samiam
-sammie
-sammy
-samsam
-sandi
-sanjose
-saphire
-sarah1
-saskia
-sassy
-saturday
-science
-scooby
-scoobydoo
-scooter1
-scorpion
-scotty
-scouts
-search
-september
-server
-seven7
-sexy
-shaggy
-shanny
-shaolin
-shasta
-shayne
-shelly
-sherry
-shirley
-shorty
-shotgun
-sidney
-simba1
-sinatra
-sirius
-skate
-skipper1
-skyler
-slayer
-sleepy
-slider
-smile1
-smitty
-smoke
-snakes
-snapper
-snoop
-solomon
-sophia
-space
-sparks
-spartan
-spike1
-sponge
-spurs
-squash
-stargate
-starlight
-stars
-steph1
-steve1
-stevens
-stewart
-stone
-stranger
-stretch
-strong
-studio
-stumpy
-sucker
-suckme
-sultan
-summit
-sunfire
-sunset
-super
-superstar
-surfing
-susan1
-sutton
-sweden
-sweetpea
-sweety
-swordfish
-tabatha
-tacobell
-taiwan
-tamtam
-tanner
-target
-tasha
-tattoo
-tequila
-terry1
-texas
-thankyou
-theend
-thompson
-thrasher
-tiger2
-timber
-timothy
-tinkerbell
-topcat
-topher
-toshiba
-tototo
-travis
-treasure
-trees
-tricky
-trish
-triton
-trombone
-trouble
-trucker
-turbo
-twins
-tyler1
-ultimate
-unique
-united
-ursula
-vacation
-valley
-vampire
-vanessa
-venice
-venus
-vermont
-vicki
-vicky
-victor1
-vincent1
-violet
-violin
-virgil
-virginia
-vision
-volley
-voodoo
-vortex
-waiting
-wanker
-warner
-water1
-wayne1
-webster
-weezer
-wendy1
-western
-white
-whitney
-whocares
-wildcat
-william1
-wilma
-window
-winniethepooh
-wolfgang
-wolverine
-wonder
-xxxxxxxx
-yamaha
-yankee
-yogibear
-yolanda
-yomama
-yvette
-zachary
-zebras
-zxcvbn
-00000000
-121212
-1234qwer
-131313
-13579
-90210
-99999999
-ABC123
-action
-amelie
-anaconda
-apollo13
-artist
-asshole
-benoit
-bernard
-bernie
-bigbird
-blizzard
-bluesky
-bonjour
-caesar
-cardinal
-carolina
-cesar
-chandler
-chapman
-charlie1
-chevy
-chiquita
-chocolat
-coco
-cougars
-courtney
-dolphins
-dominic
-donkey
-dusty
-eminem
-energy
-fearless
-forest
-forever
-glenn
-guinness
-hotdog
-indian
-jared
-jimbo
-johnson
-jojo
-josie
-kristin
-lloyd
-lorraine
-lynn
-maxime
-memory
-mimi
-mirror
-nebraska
-nemesis
-network
-nigel
-oatmeal
-patton
-pedro
-planet
-players
-portland
-praise
-psalms
-qwaszx
-raiders
-rambo1
-rancid
-shawn
-shelley
-softball
-speedo
-sports
-ssssss
-steele
-steph
-stephani
-sunday
-tiffany
-tigre
-toronto
-trixie
-undead
-valentin
-velvet
-viking
-walker
-watson
-young
-babygirl
-pretty
-hottie
-teamo
-987654321
-naruto
-spongebob
-daniela
-princesa
-christ
-blessed
-single
-qazwsx
-pokemon
-iloveyou1
-iloveyou2
-fuckyou1
-hahaha
-poop
-blessing
-blahblah
-blink182
-123qwe
-trinity
-passw0rd
-google
-looking
-spirit
-iloveyou!
-qwerty1
-onelove
-mylove
-222222
-ilovegod
-football1
-loving
-emmanuel
-1q2w3e4r
-red123
-blabla
-112233
-hallo
-spiderman
-simpsons
-monster
-november
-brooklyn
-poopoo
-darkness
-159753
-pineapple
-chester
-1qaz2wsx
-drowssap
-monkey12
-wordpass
-q1w2e3r4
-coolness
-11235813
-something
-alexandra
-estrella
-miguel
-iloveme
-sayang
-princess1
-555555
-999999
-alejandro
-brittany
-alejandra
-tequiero
-antonio
-987654
-00000
-fernando
-corazon
-cristina
-kisses
-myspace
-rebelde
-babygurl
-alyssa
-mahalkita
-gabriela
-pictures
-hellokitty
-babygirl1
-angelica
-mahalko
-mariana
-eduardo
-andres
-ronaldo
-inuyasha
-adriana
-celtic
-samsung
-angelo
-456789
-sebastian
-karina
-hotmail
-0123456789
-barcelona
-cameron
-slipknot
-cutiepie
-50cent
-bonita
-maganda
-babyboy
-natalie
-cuteako
-javier
-789456123
-123654
-bowwow
-portugal
-777777
-volleyball
-january
-cristian
-bianca
-chrisbrown
-101010
-sweet
-panget
-benfica
-love123
-lollipop
-camila
-qwertyuiop
-harrypotter
-ihateyou
-christine
-lorena
-andreea
-charmed
-rafael
-brianna
-aaliyah
-johncena
-lovelove
-gangsta
-333333
-hiphop
-mybaby
-sergio
-metallica
-myspace1
-babyblue
-badboy
-fernanda
-westlife
-sasuke
-steaua
-roberto
-slideshow
-asdfghjkl
-santiago
-jayson
-5201314
-jerome
-gandako
-gatita
-babyko
-246810
-sweetheart
-chivas
-alberto
-valeria
-nicole1
-12345678910
-leonardo
-jayjay
-liliana
-sexygirl
-232323
-amores
-anthony1
-bitch1
-fatima
-miamor
-lover
-lalala
-252525
-skittles
-colombia
-159357
-manutd
-123456a
-britney
-katrina
-christina
-pasaway
-mahal
-tatiana
-cantik
-0123456
-teiubesc
-147258369
-natalia
-francisco
-amorcito
-paola
-angelito
-manchester
-mommy1
-147258
-amigos
-marlon
-linkinpark
-147852
-diego
-444444
-iverson
-andrei
-justine
-frankie
-pimpin
-fashion
-bestfriend
-england
-hermosa
-456123
-102030
-sporting
-hearts
-potter
-iloveu2
-number1
-212121
-truelove
-jayden
-savannah
-hottie1
-ganda
-scotland
-ilovehim
-shakira
-estrellita
-brandon1
-sweets
-familia
-love12
-omarion
-monkeys
-loverboy
-elijah
-ronnie
-mamita
-999999999
-broken
-rodrigo
-westside
-mauricio
-amigas
-preciosa
-shopping
-flores
-isabella
-martinez
-elaine
-friendster
-cheche
-gracie
-connor
-valentina
-darling
-santos
-joanne
-fuckyou2
-pebbles
-sunshine1
-gangster
-gloria
-darkangel
-bettyboop
-jessica1
-cheyenne
-dustin
-iubire
-a123456
-purple1
-bestfriends
-inlove
-batista
-karla
-chacha
-marian
-sexyme
-pogiako
-jordan1
-010203
-daddy1
-daddysgirl
-billabong
-pinky
-erika
-skater
-nenita
-tigger1
-gatito
-lokita
-maldita
-buttercup
-bambam
-glitter
-123789
-sister
-zacefron
-tokiohotel
-loveya
-lovebug
-bubblegum
-marissa
-cecilia
-lollypop
-nicolas
-puppies
-ariana
-chubby
-sexybitch
-roxana
-mememe
-susana
-baller
-hotstuff
-carter
-babylove
-angelina
-playgirl
-sweet16
-012345
-bhebhe
-marcos
-loveme1
-milagros
-lilmama
-beyonce
-lovely1
-catdog
-armando
-margarita
-151515
-loves
-202020
-gerard
-undertaker
-amistad
-capricorn
-delfin
-cheerleader
-password2
-PASSWORD
-lizzie
-matthew1
-enrique
-badgirl
-141414
-dancing
-cuteme
-amelia
-skyline
-angeles
-janine
-carlitos
-justme
-legolas
-michelle1
-cinderella
-jesuschrist
-ilovejesus
-tazmania
-tekiero
-thebest
-princesita
-lucky7
-jesucristo
-buddy1
-regina
-myself
-lipgloss
-jazmin
-rosita
-chichi
-pangit
-mierda
-741852963
-hernandez
-arturo
-silvia
-melvin
-celeste
-pussycat
-gorgeous
-honeyko
-mylife
-babyboo
-loveu
-lupita
-panthers
-hollywood
-alfredo
-musica
-hawaii
-sparkle
-kristina
-sexymama
-crazy
-scarface
-098765
-hayden
-micheal
-242424
-0987654321
-marisol
-jeremiah
-mhine
-isaiah
-lolipop
-butterfly1
-xbox360
-madalina
-anamaria
-yourmom
-jasmine1
-bubbles1
-beatriz
-diamonds
-friendship
-sweetness
-desiree
-741852
-hannah1
-bananas
-julius
-leanne
-marie1
-lover1
-twinkle
-february
-bebita
-87654321
-twilight
-imissyou
-pollito
-ashlee
-cookie1
-147852369
-beckham
-simone
-nursing
-torres
-damian
-123123123
-joshua1
-babyface
-dinamo
-mommy
-juliana
-cassandra
-redsox
-gundam
-0000
-ou812
-dave
-golf
-molson
-Monday
-newpass
-thx1138
-Internet
-coke
-foobar
-abc
-fish
-fred
-help
-ncc1701d
-newuser
-none
-pat
-dog
-duck
-duke
-floyd
-guest
-joe
-kingfish
-micro
-sam
-telecom
-test1
-7777
-absolut
-babylon5
-backup
-bill
-bird33
-deliver
-fire
-flip
-galileo
-gopher
-hansolo
-jane
-jim
-mom
-passwd
-phil
-phish
-porsche911
-rain
-red
-sergei
-training
-truck
-video
-volvo
-007
-1969
-5683
-Bond007
-Friday
-Hendrix
-October
-Taurus
-aaa
-alexandr
-catalog
-challenge
-clipper
-coltrane
-cyrano
-dan
-dawn
-dean
-deutsch
-dilbert
-e-mail
-export
-ford
-fountain
-fox
-frog
-gabriell
-garlic
-goforit
-grateful
-hoops
-lady
-ledzep
-lee
-mailman
-mantra
-market
-mazda1
-metallic
-ncc1701e
-nesbitt
-open
-pete
-quest
-republic
-research
-supra
-tara
-testing
-xanadu
-xxxx
-zaphod
-zeus
-0007
-1022
-10sne1
-1973
-1978
-2000
-2222
-3bears
-Broadway
-Fisher
-Jeanne
-Killer
-Knight
-Master
-Pepper
-Sierra
-Tennis
-abacab
-abcd
-ace
-acropolis
-amy
-anders
-avenir
-basil
-bass
-beer
-ben
-bliss
-blowfish
-boss
-bridges
-buck
-bugsy
-bull
-cannondale
-canon
-catnip
-chip
-civil
-content
-cook
-cordelia
-crack1
-cyber
-daisie
-dark1
-database
-deadhead
-denali
-depeche
-dickens
-emmitt
-entropy
-farout
-farside
-feedback
-fidel
-firenze
-fish1
-fletch
-fool
-fozzie
-fun
-gargoyle
-gasman
-gold
-graphic
-hell
-image
-intern
-intrepid
-jeff
-jkl123
-joel
-johanna1
-kidder
-kim
-king
-kirk
-kris
-lambda
-leon
-logical
-lorrie
-major
-mariner
-mark1
-max
-media
-merlot
-midway
-mine
-mmouse
-moon
-mopar
-mortimer
-nermal
-nina
-olsen
-opera
-overkill
-pacers
-packer
-picard
-polar
-polo
-primus
-prometheus
-public
-radio
-rastafarian
-reptile
-rob
-robotech
-rodeo
-rolex
-rouge
-roy
-ruby
-salasana
-scarecrow
-scout
-scuba1
-sergey
-skibum
-skunk
-sound
-starter
-sting1
-sunbird
-tbird
-teflon
-temporal
-terminal
-the
-thejudge
-time
-toby
-today
-tokyo
-tree
-trout
-vader
-val
-valhalla
-windsurf
-wolf
-wolf1
-xcountry
-yoda
-yukon
-1213
-1214
-1225
-1313
-1818
-1975
-1977
-1991
-1kitty
-2001
-2020
-2112
-2kids
-333
-4444
-5050
-57chevy
-7dwarfs
-Animals
-Ariel
-Bismillah
-Booboo
-Boston
-Carol
-Computer
-Creative
-Curtis
-Denise
-Eagles
-Esther
-Fishing
-Freddy
-Gandalf
-Golden
-Goober
-Hacker
-Harley
-Henry
-Hershey
-Jackson
-Jersey
-Joanna
-Johnson
-Katie
-Kitten
-Liberty
-Lindsay
-Lizard
-Madeline
-Margaret
-Maxwell
-Money
-Monster
-Pamela
-Peaches
-Peter
-Phoenix
-Piglet
-Pookie
-Rabbit
-Raiders
-Random
-Russell
-Sammy
-Saturn
-Skeeter
-Smokey
-Sparky
-Speedy
-Sterling
-Theresa
-Thunder
-Vincent
-Willow
-Winnie
-Wolverine
-aaaa
-aardvark
-abbott
-acura
-admin
-admin1
-adrock
-aerobics
-agent
-airwolf
-ali
-alien
-allegro
-allstate
-altamira
-altima1
-andrew!
-ann
-anne
-anneli
-aptiva
-arrow
-asdf;lkj
-assmunch
-baraka
-barnyard
-bart
-bartman
-beasty
-beavis1
-bebe
-belgium
-beowulf
-beryl
-best
-bharat
-bichon
-bigal
-biker
-bilbo
-bills
-bimmer
-biochem
-birdy
-blinds
-blitz
-bluejean
-bogey
-bogus
-boulder
-bourbon
-boxer
-brain
-branch
-britain
-broker
-bucks
-buffett
-bugs
-bulls
-burns
-buzz
-c00per
-calgary
-camay
-carl
-cat
-cement
-cessna
-chad
-chainsaw
-chameleon
-chang
-chess
-chinook
-chouette
-chronos
-cicero
-circuit
-cirque
-cirrus
-clapton
-clarkson
-class
-claudel
-cleo
-cliff
-clock
-color
-comet
-concept
-concorde
-coolbean
-corky
-cornflake
-corwin
-cows
-crescent
-cross
-crowley
-cthulhu
-cunt
-current
-cutlass
-daedalus
-dagger1
-daily
-dale
-dana
-daytek
-dead
-decker
-dharma
-dillweed
-dipper
-disco
-dixon
-doitnow
-doors
-dork
-doug
-dutch
-effie
-ella
-elsie
-engage
-eric1
-ernie1
-escort1
-excel
-faculty
-fairview
-faust
-fenris
-finance
-first
-fishhead
-flanders
-fleurs
-flute
-flyboy
-flyer
-franka
-frederic
-free
-front242
-frontier
-fugazi
-funtime
-gaby
-gaelic
-gambler
-gammaphi
-garfunkel
-garth
-gary
-gateway2
-gator1
-gibbons
-gigi
-gilgamesh
-goat
-godiva
-goethe
-gofish
-good
-gramps
-gravis
-gray
-greed
-greg
-greg1
-greta
-gretzky
-guido
-gumby
-h2opolo
-hamid
-hank
-hawkeye1
-health1
-hello8
-help123
-helper
-homerj
-hoosier
-hope
-huang
-hugo
-hydrogen
-ib6ub9
-insight
-instructor
-integral
-iomega
-iris
-izzy
-jazz
-jean
-jeepster
-jetta1
-joanie
-josee
-joy
-julia2
-jumbo
-jump
-justice4
-kalamazoo
-kali
-kat
-kate
-kerala
-kids
-kiwi
-kleenex
-kombat
-lamer
-laser
-laserjet
-lassie1
-leblanc
-legal
-leo
-life
-lions
-liz
-logger
-logos
-loislane
-loki
-longer
-lori
-lost
-lotus
-lou
-macha
-macross
-madoka
-makeitso
-mallard
-marc
-math
-mattingly
-mechanic
-meister
-mercer
-merde
-merrill
-michal
-michou
-mickel
-minou
-mobydick
-modem
-mojo
-montana3
-montrose
-motor
-mowgli
-mulder1
-muscle
-neil
-neutrino
-newaccount
-nicklaus
-nightshade
-nightwing
-nike
-none1
-nopass
-nouveau
-novell
-oaxaca
-obiwan
-obsession
-orville
-otter
-ozzy
-packrat
-paint
-papa
-paradigm
-pass
-pavel
-peterk
-phialpha
-phishy
-piano1
-pianoman
-pianos
-pipeline
-plato
-play
-poetic
-print
-printing
-provider
-qqq111
-quebec
-qwer
-racer
-racerx
-radar
-rafiki
-raleigh
-rasta1
-redcloud
-redfish
-redwing
-redwood
-reed
-rene
-reznor
-rhino
-ripple
-rita
-robocop
-robotics
-roche
-roni
-rossignol
-rugger
-safety1
-saigon
-satori
-saturn5
-schnapps
-scotch
-scuba
-secret3
-seeker
-services
-sex
-shanghai
-shazam
-shelter
-sigmachi
-signal
-signature
-simsim
-skydive
-slick
-smegma
-smiths
-smurfy
-snow
-sober1
-sonics
-sony
-spazz
-sphynx
-spock
-spoon
-spot
-sprocket
-starbuck
-steel
-stephi
-sting
-stocks
-storage
-strat
-strato
-stud
-student2
-susanna
-swanson
-swim
-switzer
-system5
-t-bone
-talon
-tarheel
-tata
-tazdevil
-tester
-testtest
-thisisit
-thorne
-tightend
-tim
-tom
-tool
-total
-toucan
-transfer
-transit
-transport
-trapper
-trash
-trophy
-tucson
-turbo2
-unity
-upsilon
-vedder
-vette
-vikram
-virago
-visual
-volcano
-walden
-waldo
-walleye
-webmaster
-wedge
-whale1
-whit
-whoville
-wibble
-will
-wombat1
-word
-world
-x-files
-xxx123
-zack
-zepplin
-zoltan
-zoomer
-123go
-21122112
-5555
-911
-FuckYou
-Fuckyou
-Gizmo
-Hello
-Michel
-Qwerty
-Windows
-angus
-aspen
-ass
-bird
-booster
-byteme
-cats
-changeit
-christia
-christoph
-classroom
-cloclo
-corrado
-dasha
-fiction
-french1
-fubar
-gator
-gilles
-gocougs
-hilbert
-hola
-home
-judy
-koko
-lulu
-mac
-macintosh
-mailer
-mars
-meow
-ne1469
-niki
-paul
-politics
-pomme
-property
-ruth
-sales
-salut
-scrooge
-skidoo
-spain
-surf
-sylvie
-symbol
-forum
-rotimi
-god
-saved
-2580
-1998
-xxx
-1928
-777
-info
-a
-netware
-sun
-tech
-doom
-mmm
-one
-ppp
-1911
-1948
-1996
-5252
-Champs
-Tuesday
-bach
-crow
-don
-draft
-hal9000
-herzog
-huey
-jethrotull
-jussi
-mail
-miki
-nicarao
-snowski
-1316
-1412
-1430
-1952
-1953
-1955
-1956
-1960
-1964
-1qw23e
-2200
-2252
-3010
-3112
-4788
-6262
-Alpha
-Bastard
-Beavis
-Cardinal
-Celtics
-Cougar
-Darkman
-Figaro
-Fortune
-Geronimo
-Hammer
-Homer
-Janet
-Mellon
-Merlot
-Metallic
-Montreal
-Newton
-Paladin
-Peanuts
-Service
-Vernon
-Waterloo
-Webster
-aki123
-aqua
-aylmer
-beta
-bozo
-car
-chat
-chinacat
-cora
-courier
-dogbert
-eieio
-elina1
-fly
-funguy
-fuzz
-ggeorge
-glider1
-gone
-hawk
-heikki
-histoire
-hugh
-if6was9
-ingvar
-jan
-jedi
-jimi
-juhani
-khan
-lima
-midvale
-neko
-nesbit
-nexus6
-nisse
-notta1
-pam
-park
-pole
-pope
-pyro
-ram
-reliant
-rex
-rush
-seoul
-skip
-stan
-sue
-suzy
-tab
-testi
-thelorax
-tika
-tnt
-toto1
-tre
-wind
-x-men
-xyz
-zxc
-369
-Abcdef
-Asdfgh
-Changeme
-NCC1701
-Zxcvbnm
-demo
-doom2
-good-luck
-homebrew
-m1911a1
-nat
-ne1410s
-ne14a69
-zhongguo
-sample123
-0852
-basf
-OU812
-!@#$%
-informix
-majordomo
-news
-temp
-trek
-!@#$%^
-!@#$%^&*
-Pentium
-Raistlin
-adi
-bmw
-law
-new
-opus
-plus
-visa
-www
-zzz
-1332
-1950
-3141
-3533
-4055
-4854
-6301
-Bonzo
-ChangeMe
-Front242
-Gretel
-Michel1
-Noriko
-Sidekick
-Sverige
-Swoosh
-Woodrow
-ayelet
-barn
-betacam
-biz
-boat
-cuda
-doc
-hal
-hallowell
-haro
-hosehead
-ilmari
-irmeli
-j1l2t3
-jer
-kcin
-kerrya
-kissa2
-leaf
-lissabon
-mart
-matti1
-mech
-morecats
-paagal
-performa
-prof
-ratio
-ship
-slip
-stivers
-tapani
-targas
-test2
-test3
-tula
-unix
-user1
-xanth
-!@#$%^&
-1701d
-@#$%^&
-Qwert
-allo
-dirk
-newcourt
-nite
-notused
-sss

=== modified file 'plugin/password_validation/validate_password.cc'
--- a/plugin/password_validation/validate_password.cc	2012-05-02 08:59:24 +0000
+++ b/plugin/password_validation/validate_password.cc	2012-05-10 10:54:37 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -13,17 +13,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
-#include <m_ctype.h>
 #include <string>
 #include <mysql/plugin_validate_password.h>
 #include <set>
-#include <iostream>         /* dictionary file read       */
+#include <iostream>
 #include <fstream>
-#include "sql_plugin.h"     /* for opt_plugin_dir         */
-#include "log.h"            /* for warning                */
 
-#define MAX_DICTIONARY_FILE_LENGTH 1024 * 1024
-#define MIN_DICTIONARY_WORD_LENGTH 4
+#define MAX_DICTIONARY_FILE_LENGTH    1024 * 1024
+#define PASSWORD_SCORE                25
+#define MIN_DICTIONARY_WORD_LENGTH    4
 
 enum PASSWORD_POLICY { PASSWORD_STRENGTH_REJECTED, PASSWORD_STRENGTH_LOW,
                        PASSWORD_STRENGTH_MEDIUM, PASSWORD_STRENGTH_STRONG };
@@ -32,6 +30,7 @@ typedef std::string string_type;
 typedef std::set<string_type> set_type;
 set_type dictionary_words;
 
+static char *dictionary_file= NULL;
 static uint validate_password_length;
 static uint validate_password_number_count;
 static uint validate_password_mixed_case_count;
@@ -39,109 +38,131 @@ static uint validate_password_special_ch
 static uint validate_password_policy_number;
 static char *validate_password_dictionary_file;
 
-static bool validate_dictionary_check(String *password)
+/* To read dictionary file into std::set */
+static void read_dictionary_file()
 {
-  const CHARSET_INFO *cs= password->charset();
-  String tmp_password_str;
-  if (cs->casedn_multiply == 1)
-  {
-    uint len;
-    len= cs->cset->casedn(cs, (char*) password->ptr(), password->length(),
-                              (char*) password->ptr(), password->length());
-    password->length(len);
-  }
-  else
-  {
-    uint len= password->length() * cs->casedn_multiply;
-    tmp_password_str.alloc(len);
-    tmp_password_str.set_charset(cs);
-    len= cs->cset->casedn(cs, (char*) password->ptr(), password->length(),
-                              (char*) tmp_password_str.ptr(), len);
-    tmp_password_str.length(len);
-    password= &tmp_password_str;
+  string_type words;
+  long file_length;
+  std::ifstream dictionary_stream(dictionary_file);
+
+  if (!dictionary_stream)
+    return;
+  dictionary_stream.seekg(0, std::ios::end);
+  file_length= dictionary_stream.tellg();
+  dictionary_stream.seekg(0, std::ios::beg);
+  if (file_length > MAX_DICTIONARY_FILE_LENGTH)
+  {
+    dictionary_stream.close();
+    return;
+  }
+  while (dictionary_stream.good())
+  {
+    std::getline(dictionary_stream, words);
+    dictionary_words.insert(words);
   }
+  dictionary_stream.close();
+}
+
+/* Clear words from std::set */
+static void free_dictionary_file()
+{
+  if (!dictionary_words.empty())
+   dictionary_words.clear();
+}
+
+/** Checks weather password or substring of password
+    is present in dictionary file stored as std::set
+*/
+static int validate_dictionary_check(string_handle password, size_t length)
+{
   uint substr_pos= 0;
-  uint substr_length= password->length();
-  string_type password_str((const char *)password->ptr());
+  uint substr_length= length;
+  string_type password_str= password_string_casedn(password);
   string_type password_substr;
   set_type::iterator itr;
 
-  while (substr_length >= MIN_DICTIONARY_WORD_LENGTH)
+  /* New dictionary file */
+  if (dictionary_file != validate_password_dictionary_file)
+  {
+    dictionary_file= validate_password_dictionary_file;
+    free_dictionary_file();
+    read_dictionary_file();
+  }
+  /* std::set as container stores the dictionary words,
+     binary comparison between dictionary words and password */
+  if (!dictionary_words.empty())
   {
-    substr_pos= 0;
-    while (substr_pos + substr_length <= password->length())
+    while (substr_length >= MIN_DICTIONARY_WORD_LENGTH)
     {
-      password_substr= password_str.substr(substr_pos, substr_length);
-      itr= dictionary_words.find(password_substr);
-      if (itr != dictionary_words.end())
-        return 0;
-      substr_pos++;
+      substr_pos= 0;
+      while (substr_pos + substr_length <= length)
+      {
+        password_substr= password_str.substr(substr_pos, substr_length);
+        itr= dictionary_words.find(password_substr);
+        if (itr != dictionary_words.end())
+          return 0;
+        substr_pos++;
+      }
+      substr_length--;
     }
-     substr_length--;
-   }
+  }
   return 1;
 }
 
-static bool validate_password_policy(String *password, uint policy)
+static int validate_password_policy(string_handle password, size_t length,
+                                     uint policy)
 {
-  uint has_numbers= 0;
-  uint has_special_chars= 0;
-  uint has_lower= 0;
-  uint has_upper= 0;
-  char *beg= (char*) password->ptr();
-  char *end= (char*) password->ptr() + password->length();
-  const CHARSET_INFO *cs= password->charset();
-  if (password->length() >= validate_password_length)
+  PASSWORD_CHAR_CASE chars_case;
+  chars_case.has_numbers= 0;
+  chars_case.has_lower= 0;
+  chars_case.has_upper= 0;
+  chars_case.has_special_chars= 0;
+
+  if (length >= validate_password_length)
   {
     if (policy == PASSWORD_STRENGTH_LOW)
       return 1;
-    while (beg < end)
-    {
-      int ctype, char_len;
-      char_len= cs->cset->ctype(cs, &ctype, (uchar*) beg, (uchar*) end);
-      if (ctype & _MY_NMR)
-        has_numbers++;
-      else if (ctype & _MY_L)
-        has_lower++;
-      else if (ctype & _MY_U)
-        has_upper++;
-      else
-        has_special_chars++;
-      beg+= (char_len > 0 ? char_len : (char_len < 0 ? -char_len : 1));
-    }
+    password_string_case(&chars_case, password);
 
-    if (has_upper >= validate_password_mixed_case_count &&
-        has_lower >= validate_password_mixed_case_count &&
-        has_special_chars >= validate_password_special_char_count &&
-        has_numbers >= validate_password_number_count)
+    if (chars_case.has_upper >= validate_password_mixed_case_count &&
+        chars_case.has_lower >= validate_password_mixed_case_count &&
+        chars_case.has_special_chars >= validate_password_special_char_count &&
+        chars_case.has_numbers >= validate_password_number_count)
     {
-      if (policy == PASSWORD_STRENGTH_MEDIUM || dictionary_words.empty() ||
-                    validate_dictionary_check(password))
+      if (policy == PASSWORD_STRENGTH_MEDIUM ||
+          validate_dictionary_check(password, length))
         return 1;
     }
   }
   return 0;
 }
 
-static bool validate_password(String *password)
+/* Actual plugin function which acts as a wrapper */
+static int validate_password(string_handle password, size_t length)
 {
-  return validate_password_policy(password, validate_password_policy_number);
+  return validate_password_policy
+         (password, length, validate_password_policy_number);
 }
 
-static uint validate_password_strength(String *password)
+/* Password strength between (0-100) */
+static int get_password_strength(string_handle password, size_t length)
 {
-  if (validate_password_policy(password, PASSWORD_STRENGTH_LOW))
+  int policy=0;
+  
+  if (length < MIN_DICTIONARY_WORD_LENGTH)
+    return policy;
+
+  if (validate_password_policy(password, length, PASSWORD_STRENGTH_LOW))
   {
-    uint policy= PASSWORD_STRENGTH_LOW;
-    if (validate_password_policy(password, PASSWORD_STRENGTH_MEDIUM))
+    policy= PASSWORD_STRENGTH_LOW;
+    if (validate_password_policy(password, length, PASSWORD_STRENGTH_MEDIUM))
     {
       policy= PASSWORD_STRENGTH_MEDIUM;
-      if (dictionary_words.empty() || validate_dictionary_check(password))
+      if (validate_dictionary_check(password, length))
         policy= PASSWORD_STRENGTH_STRONG;
     }
-    return policy;
   }
-  return PASSWORD_STRENGTH_REJECTED;
+  return (policy * PASSWORD_SCORE + PASSWORD_SCORE);
 }
 
 /*
@@ -150,51 +171,19 @@ static uint validate_password_strength(S
 
 static struct st_mysql_validate_password validate_password_descriptor=
 {
-  MYSQL_VALIDATE_PASSWORD_INTERFACE_VERSION, /* interface version          */
+  MYSQL_VALIDATE_PASSWORD_INTERFACE_VERSION,
   validate_password,                         /* validate function          */
-  validate_password_strength                 /* validate strength function */
+  get_password_strength                      /* validate strength function */
 };
 
 static int validate_password_init(void *arg __attribute__((unused)))
 {
-  char *dictionary_file;
-  char default_dictionary_file[FN_REFLEN];
-  string_type words;
-  ulonglong file_length;
-  fn_format(default_dictionary_file, "dictionary.txt", opt_plugin_dir_ptr,
-            "", MYF(0));
-  dictionary_file= (validate_password_dictionary_file ?
-                    validate_password_dictionary_file :
-                    default_dictionary_file);
-  std::ifstream dictionary_stream(dictionary_file);
-  if (!dictionary_stream)
-  {
-    if (validate_password_dictionary_file)
-      sql_print_warning("dictionary file not found");
-    return 0;
-  }
-  dictionary_stream.seekg (0, std::ios::end);
-  file_length= dictionary_stream.tellg();
-  dictionary_stream.seekg (0, std::ios::beg);
-  if (file_length > MAX_DICTIONARY_FILE_LENGTH)
-  {
-    dictionary_stream.close();
-    sql_print_warning("dictionary file size too large");
-    return 0;
-  }
-  while (dictionary_stream.good())
-  {
-    std::getline(dictionary_stream, words);
-    dictionary_words.insert(words);
-  }
-  dictionary_stream.close();
   return 0;
 }
 
 static int validate_password_deinit(void *arg __attribute__((unused)))
 {
-  if (!dictionary_words.empty())
-   dictionary_words.clear();
+  free_dictionary_file();
   return 0;
 }
 
@@ -228,7 +217,7 @@ static MYSQL_SYSVAR_UINT(policy_number,
   NULL, NULL, 2, 1, 3, 0);
 
 static MYSQL_SYSVAR_STR(dictionary_file, validate_password_dictionary_file,
-  PLUGIN_VAR_READONLY,
+  PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC,
   "password_validate_dictionary file to be loaded and check for password",
   NULL, NULL, NULL);
 

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2012-04-30 06:36:01 +0000
+++ b/sql/item_func.cc	2012-05-10 10:54:37 +0000
@@ -3233,7 +3233,7 @@ longlong Item_func_validate_password_str
   String *field;
   if (!(field= args[0]->val_str(&value)))
     return 0;
-    return (check_password_strength(field));
+  return (check_password_strength(field));
 }
 
 

=== modified file 'sql/share/CMakeLists.txt'
--- a/sql/share/CMakeLists.txt	2011-06-30 15:46:53 +0000
+++ b/sql/share/CMakeLists.txt	2012-05-10 10:54:37 +0000
@@ -42,6 +42,7 @@ serbian
 
 SET(files 
  errmsg-utf8.txt
+ dictionary.txt
 )
 
 FOREACH (dir ${dirs})

=== added file 'sql/share/dictionary.txt'
--- a/sql/share/dictionary.txt	1970-01-01 00:00:00 +0000
+++ b/sql/share/dictionary.txt	2012-05-10 10:54:37 +0000
@@ -0,0 +1,3538 @@
+0000
+1111
+123456
+12345
+password
+password1
+123456789
+12345678
+1234567890
+abc123
+computer
+tigger
+1234
+qwerty
+money
+carmen
+mickey
+secret
+summer
+internet
+a1b2c3
+service
+canada
+hello
+ranger
+shadow
+baseball
+donald
+harley
+hockey
+letmein
+maggie
+mike
+mustang
+snoopy
+buster
+dragon
+jordan
+michael
+michelle
+mindy
+patrick
+123abc
+andrew
+bear
+calvin
+changeme
+diamond
+fuckme
+fuckyou
+matthew
+miller
+tiger
+trustno1
+alex
+apple
+avalon
+brandy
+chelsea
+coffee
+falcon
+freedom
+gandalf
+green
+helpme
+linda
+magic
+merlin
+newyork
+soccer
+thomas
+wizard
+asdfgh
+bandit
+batman
+boris
+butthead
+dorothy
+eeyore
+fishing
+football
+george
+happy
+iloveyou
+jennifer
+jonathan
+love
+marina
+master
+missy
+monday
+monkey
+natasha
+ncc1701
+pamela
+pepper
+piglet
+poohbear
+pookie
+rabbit
+rachel
+rocket
+rose
+smile
+sparky
+spring
+steven
+success
+sunshine
+victoria
+whatever
+zapata
+8675309
+amanda
+andy
+angel
+august
+barney
+biteme
+boomer
+brian
+casey
+cowboy
+delta
+doctor
+fisher
+island
+john
+joshua
+karen
+marley
+orange
+please
+rascal
+richard
+sarah
+scooter
+shalom
+silver
+skippy
+stanley
+taylor
+welcome
+zephyr
+111111
+aaaaaa
+access
+albert
+alexander
+andrea
+anna
+anthony
+asdfjkl;
+ashley
+basketball
+beavis
+black
+bob
+booboo
+bradley
+brandon
+buddy
+caitlin
+camaro
+charlie
+chicken
+chris
+cindy
+cricket
+dakota
+dallas
+daniel
+david
+debbie
+dolphin
+elephant
+emily
+friend
+fucker
+ginger
+goodluck
+hammer
+heather
+iceman
+jason
+jessica
+jesus
+joseph
+jupiter
+justin
+kevin
+knight
+lacrosse
+lakers
+lizard
+madison
+mary
+mother
+muffin
+murphy
+nirvana
+paris
+pentium
+phoenix
+picture
+rainbow
+sandy
+saturn
+scott
+shannon
+shithead
+skeeter
+sophie
+special
+stephanie
+stephen
+steve
+sweetie
+teacher
+tennis
+test
+test123
+tommy
+topgun
+tristan
+wally
+william
+wilson
+1q2w3e
+654321
+666666
+a12345
+a1b2c3d4
+alpha
+amber
+angela
+angie
+archie
+asdf
+blazer
+bond007
+booger
+charles
+christin
+claire
+control
+danny
+david1
+dennis
+digital
+disney
+edward
+elvis
+felix
+flipper
+franklin
+frodo
+honda
+horses
+hunter
+indigo
+james
+jasper
+jeremy
+julian
+kelsey
+killer
+lauren
+marie
+maryjane
+matrix
+maverick
+mayday
+mercury
+mitchell
+morgan
+mountain
+niners
+nothing
+oliver
+peace
+peanut
+pearljam
+phantom
+popcorn
+princess
+psycho
+pumpkin
+purple
+randy
+rebecca
+reddog
+robert
+rocky
+roses
+salmon
+samson
+sharon
+sierra
+smokey
+startrek
+steelers
+stimpy
+sunflower
+superman
+support
+sydney
+techno
+walter
+willie
+willow
+winner
+ziggy
+zxcvbnm
+alaska
+alexis
+alice
+animal
+apples
+barbara
+benjamin
+billy
+blue
+bluebird
+bobby
+bonnie
+bubba
+camera
+chocolate
+clark
+claudia
+cocacola
+compton
+connect
+cookie
+cruise
+douglas
+dreamer
+dreams
+duckie
+eagles
+eddie
+einstein
+enter
+explorer
+faith
+family
+ferrari
+flamingo
+flower
+foxtrot
+francis
+freddy
+friday
+froggy
+giants
+gizmo
+global
+goofy
+happy1
+hendrix
+henry
+herman
+homer
+honey
+house
+houston
+iguana
+indiana
+insane
+inside
+irish
+ironman
+jake
+jasmin
+jeanne
+jerry
+joey
+justice
+katherine
+kermit
+kitty
+koala
+larry
+leslie
+logan
+lucky
+mark
+martin
+matt
+minnie
+misty
+mitch
+mouse
+nancy
+nascar
+nelson
+pantera
+parker
+penguin
+peter
+piano
+pizza
+prince
+punkin
+pyramid
+raymond
+robin
+roger
+rosebud
+route66
+royal
+running
+sadie
+sasha
+security
+sheena
+sheila
+skiing
+snapple
+snowball
+sparrow
+spencer
+spike
+star
+stealth
+student
+sunny
+sylvia
+tamara
+taurus
+teresa
+theresa
+thunderbird
+tigers
+tony
+toyota
+travel
+tuesday
+victory
+viper1
+wesley
+whisky
+winnie
+winter
+wolves
+xyz123
+zorro
+123123
+1234567
+696969
+888888
+Anthony
+Joshua
+Matthew
+Tigger
+aaron
+abby
+abcdef
+adidas
+adrian
+alfred
+arthur
+athena
+austin
+awesome
+badger
+bamboo
+beagle
+bears
+beatles
+beautiful
+beaver
+benny
+bigmac
+bingo
+bitch
+blonde
+boogie
+boston
+brenda
+bright
+bubba1
+bubbles
+buffy
+button
+buttons
+cactus
+candy
+captain
+carlos
+caroline
+carrie
+casper
+catch22
+chance
+charity
+charlotte
+cheese
+cheryl
+chloe
+chris1
+clancy
+compaq
+conrad
+cooper
+cooter
+copper
+cosmos
+cougar
+cracker
+crawford
+crystal
+curtis
+cyclone
+dance
+diablo
+dollars
+dookie
+dumbass
+dundee
+elizabeth
+eric
+europe
+farmer
+firebird
+fletcher
+fluffy
+france
+freak1
+friends
+fuckoff
+gabriel
+galaxy
+gambit
+garden
+garfield
+garnet
+genesis
+genius
+godzilla
+golfer
+goober
+grace
+greenday
+groovy
+grover
+guitar
+hacker
+harry
+hazel
+hector
+herbert
+horizon
+hornet
+howard
+icecream
+imagine
+impala
+jack
+janice
+jasmine
+jason1
+jeanette
+jeffrey
+jenifer
+jenni
+jesus1
+jewels
+joker
+julie
+julie1
+junior
+justin1
+kathleen
+keith
+kelly
+kelly1
+kennedy
+kevin1
+knicks
+larry1
+leonard
+lestat
+library
+lincoln
+lionking
+london
+louise
+lucky1
+lucy
+maddog
+margaret
+mariposa
+marlboro
+martin1
+marty
+master1
+mensuck
+mercedes
+metal
+midori
+mikey
+millie
+mirage
+molly
+monet
+money1
+monica
+monopoly
+mookie
+moose
+moroni
+music
+naomi
+nathan
+nguyen
+nicholas
+nicole
+nimrod
+october
+olive
+olivia
+online
+oscar
+oxford
+pacific
+painter
+peaches
+penelope
+pepsi
+petunia
+philip
+phoenix1
+photo
+pickle
+player
+poiuyt
+porsche
+porter
+puppy
+python
+quality
+raquel
+raven
+remember
+robbie
+robert1
+roman
+rugby
+runner
+russell
+ryan
+sailing
+sailor
+samantha
+savage
+scarlett
+school
+sean
+seven
+shadow1
+sheba
+shelby
+shit
+shoes
+simba
+simple
+skipper
+smiley
+snake
+snickers
+sniper
+snoopdog
+snowman
+sonic
+spitfire
+sprite
+spunky
+starwars
+station
+stella
+stingray
+storm
+stormy
+stupid
+sunny1
+sunrise
+surfer
+susan
+tammy
+tango
+tanya
+teddy1
+theboss
+theking
+thumper
+tina
+tintin
+tomcat
+trebor
+trevor
+tweety
+unicorn
+valentine
+valerie
+vanilla
+veronica
+victor
+vincent
+viper
+warrior
+warriors
+weasel
+wheels
+wilbur
+winston
+wisdom
+wombat
+xavier
+yellow
+zeppelin
+1111
+1212
+Andrew
+Family
+Friends
+Michael
+Michelle
+Snoopy
+abcd1234
+abcdefg
+abigail
+account
+adam
+alex1
+alice1
+allison
+alpine
+andre1
+andrea1
+angel1
+anita
+annette
+antares
+apache
+apollo
+aragorn
+arizona
+arnold
+arsenal
+asdfasdf
+asdfg
+asdfghjk
+avenger
+baby
+babydoll
+bailey
+banana
+barry
+basket
+batman1
+beaner
+beast
+beatrice
+bella
+bertha
+bigben
+bigdog
+biggles
+bigman
+binky
+biology
+bishop
+blondie
+bluefish
+bobcat
+bosco
+braves
+brazil
+bruce
+bruno
+brutus
+buffalo
+bulldog
+bullet
+bullshit
+bunny
+business
+butch
+butler
+butter
+california
+carebear
+carol
+carol1
+carole
+cassie
+castle
+catalina
+catherine
+cccccc
+celine
+center
+champion
+chanel
+chaos
+chelsea1
+chester1
+chicago
+chico
+christian
+christy
+church
+cinder
+colleen
+colorado
+columbia
+commander
+connie
+cookies
+cooking
+corona
+cowboys
+coyote
+craig
+creative
+cuddles
+cuervo
+cutie
+daddy
+daisy
+daniel1
+danielle
+davids
+death
+denis
+derek
+design
+destiny
+diana
+diane
+dickhead
+digger
+dodger
+donna
+dougie
+dragonfly
+dylan
+eagle
+eclipse
+electric
+emerald
+etoile
+excalibur
+express
+fender
+fiona
+fireman
+flash
+florida
+flowers
+foster
+francesco
+francine
+francois
+frank
+french
+fuckface
+gemini
+general
+gerald
+germany
+gilbert
+goaway
+golden
+goldfish
+goose
+gordon
+graham
+grant
+gregory
+gretchen
+gunner
+hannah
+harold
+harrison
+harvey
+hawkeye
+heaven
+heidi
+helen
+helena
+hithere
+hobbit
+ibanez
+idontknow
+integra
+ireland
+irene
+isaac
+isabel
+jackass
+jackie
+jackson
+jaguar
+jamaica
+japan
+jenny1
+jessie
+johan
+johnny
+joker1
+jordan23
+judith
+julia
+jumanji
+kangaroo
+karen1
+kathy
+keepout
+keith1
+kenneth
+kimberly
+kingdom
+kitkat
+kramer
+kristen
+laura
+laurie
+lawrence
+lawyer
+legend
+liberty
+light
+lindsay
+lindsey
+lisa
+liverpool
+lola
+lonely
+louis
+lovely
+loveme
+lucas
+madonna
+malcolm
+malibu
+marathon
+marcel
+maria1
+mariah
+mariah1
+marilyn
+mario
+marvin
+maurice
+maxine
+maxwell
+me
+meggie
+melanie
+melissa
+melody
+mexico
+michael1
+michele
+midnight
+mike1
+miracle
+misha
+mishka
+molly1
+monique
+montreal
+moocow
+moore
+morris
+mouse1
+mulder
+nautica
+nellie
+newton
+nick
+nirvana1
+nissan
+norman
+notebook
+ocean
+olivier
+ollie
+oranges
+oregon
+orion
+panda
+pandora
+panther
+passion
+patricia
+pearl
+peewee
+pencil
+penny
+people
+percy
+person
+peter1
+petey
+picasso
+pierre
+pinkfloyd
+polaris
+police
+pookie1
+poppy
+power
+predator
+preston
+q1w2e3
+queen
+queenie
+quentin
+ralph
+random
+rangers
+raptor
+reality
+redrum
+remote
+reynolds
+rhonda
+ricardo
+ricardo1
+ricky
+river
+roadrunner
+robinhood
+rocknroll
+rocky1
+ronald
+roxy
+ruthie
+sabrina
+sakura
+sally
+sampson
+samuel
+sandra
+santa
+sapphire
+scarlet
+scorpio
+scott1
+scottie
+scruffy
+seattle
+serena
+shanti
+shark
+shogun
+simon
+singer
+skull
+skywalker
+slacker
+smashing
+smiles
+snowflake
+snuffy
+soccer1
+soleil
+sonny
+spanky
+speedy
+spider
+spooky
+stacey
+star69
+start
+steven1
+stinky
+strawberry
+stuart
+sugar
+sundance
+superfly
+suzanne
+suzuki
+swimmer
+swimming
+system
+taffy
+tarzan
+teddy
+teddybear
+terry
+theatre
+thunder
+thursday
+tinker
+tootsie
+tornado
+tracy
+tricia
+trident
+trojan
+truman
+trumpet
+tucker
+turtle
+tyler
+utopia
+voyager
+warcraft
+warlock
+warren
+water
+wayne
+wendy
+williams
+willy
+winona
+woody
+woofwoof
+wrangler
+wright
+xfiles
+xxxxxx
+yankees
+yvonne
+zebra
+zenith
+zigzag
+zombie
+zxc123
+zxcvb
+000000
+007007
+11111
+11111111
+123321
+171717
+181818
+1a2b3c
+1chris
+4runner
+54321
+55555
+6969
+7777777
+789456
+88888888
+Alexis
+Bailey
+Charlie
+Chris
+Daniel
+Dragon
+Elizabeth
+HARLEY
+Heather
+Jennifer
+Jessica
+Jordan
+KILLER
+Nicholas
+Password
+Princess
+Purple
+Rebecca
+Robert
+Shadow
+Steven
+Summer
+Sunshine
+Superman
+Taylor
+Thomas
+Victoria
+abcd123
+abcde
+accord
+active
+africa
+airborne
+alfaro
+alicia
+aliens
+alina
+aline
+alison
+allen
+aloha
+alpha1
+althea
+altima
+amanda1
+amazing
+america
+amour
+anderson
+andre
+andrew1
+andromeda
+angels
+angie1
+annie
+anything
+apple1
+apple2
+applepie
+april
+aquarius
+ariane
+ariel
+arlene
+artemis
+asdf1234
+asdfjkl
+ashley1
+ashraf
+ashton
+asterix
+attila
+autumn
+avatar
+babes
+bambi
+barbie
+barney1
+barrett
+bball
+beaches
+beanie
+beans
+beauty
+becca
+belize
+belle
+belmont
+benji
+benson
+bernardo
+berry
+betsy
+betty
+bigboss
+bigred
+billy1
+birdie
+birthday
+biscuit
+bitter
+blackjack
+blah
+blanche
+blood
+blowjob
+blowme
+blueeyes
+blues
+bogart
+bombay
+boobie
+boots
+bootsie
+boxers
+brandi
+brent
+brewster
+bridge
+bronco
+bronte
+brooke
+brother
+bryan
+bubble
+buddha
+budgie
+burton
+butterfly
+byron
+calendar
+calvin1
+camel
+camille
+campbell
+camping
+cancer
+canela
+cannon
+carbon
+carnage
+carolyn
+carrot
+cascade
+catfish
+cathy
+catwoman
+cecile
+celica
+change
+chantal
+charger
+cherry
+chiara
+chiefs
+china
+chris123
+christ1
+christmas
+christopher
+chuck
+cindy1
+cinema
+civic
+claude
+clueless
+cobain
+cobra
+cody
+colette
+college
+colors
+colt45
+confused
+cool
+corvette
+cosmo
+country
+crusader
+cunningham
+cupcake
+cynthia
+dagger
+dammit
+dancer
+daphne
+darkstar
+darren
+darryl
+darwin
+deborah
+december
+deedee
+deeznuts
+delano
+delete
+demon
+denise
+denny
+desert
+deskjet
+detroit
+devil
+devine
+devon
+dexter
+dianne
+diesel
+director
+dixie
+dodgers
+doggy
+dollar
+dolly
+dominique
+domino
+dontknow
+doogie
+doudou
+downtown
+dragon1
+driver
+dude
+dudley
+dutchess
+dwight
+eagle1
+easter
+eastern
+edith
+edmund
+eight
+element
+elissa
+ellen
+elliot
+empire
+enigma
+enterprise
+erin
+escort
+estelle
+eugene
+evelyn
+explore
+family1
+fatboy
+felipe
+ferguson
+ferret
+ferris
+fireball
+fishes
+fishie
+flight
+florida1
+flowerpot
+forward
+freddie
+freebird
+freeman
+frisco
+fritz
+froggie
+froggies
+frogs
+fucku
+future
+gabby
+games
+garcia
+gaston
+gateway
+george1
+georgia
+german
+germany1
+getout
+ghost
+gibson
+giselle
+gmoney
+goblin
+goblue
+gollum
+grandma
+gremlin
+grizzly
+grumpy
+guess
+guitar1
+gustavo
+haggis
+haha
+hailey
+halloween
+hamilton
+hamlet
+hanna
+hanson
+happy123
+happyday
+hardcore
+harley1
+harriet
+harris
+harvard
+health
+heart
+heather1
+heather2
+hedgehog
+helene
+hello1
+hello123
+hellohello
+hermes
+heythere
+highland
+hilda
+hillary
+history
+hitler
+hobbes
+holiday
+holly
+honda1
+hongkong
+hootie
+horse
+hotrod
+hudson
+hummer
+huskies
+idiot
+iforget
+iloveu
+impact
+indonesia
+irina
+isabelle
+israel
+italia
+italy
+jackie1
+jacob
+jakey
+james1
+jamesbond
+jamie
+jamjam
+jeffrey1
+jennie
+jenny
+jensen
+jesse
+jesse1
+jester
+jethro
+jimbob
+jimmy
+joanna
+joelle
+john316
+jordie
+jorge
+josh
+journey
+joyce
+jubilee
+jules
+julien
+juliet
+junebug
+juniper
+justdoit
+karin
+karine
+karma
+katerina
+katie
+katie1
+kayla
+keeper
+keller
+kendall
+kenny
+ketchup
+kings
+kissme
+kitten
+kittycat
+kkkkkk
+kristi
+kristine
+labtec
+laddie
+ladybug
+lance
+laurel
+lawson
+leader
+leland
+lemon
+lester
+letter
+letters
+lexus1
+libra
+lights
+lionel
+little
+lizzy
+lolita
+lonestar
+longhorn
+looney
+loren
+lorna
+loser
+lovers
+loveyou
+lucia
+lucifer
+lucky14
+maddie
+madmax
+magic1
+magnum
+maiden
+maine
+management
+manson
+manuel
+marcus
+maria
+marielle
+marine
+marino
+marshall
+martha
+maxmax
+meatloaf
+medical
+megan
+melina
+memphis
+mermaid
+miami
+michel
+michigan
+mickey1
+microsoft
+mikael
+milano
+miles
+millenium
+million
+miranda
+miriam
+mission
+mmmmmm
+mobile
+monkey1
+monroe
+montana
+monty
+moomoo
+moonbeam
+morpheus
+motorola
+movies
+mozart
+munchkin
+murray
+mustang1
+nadia
+nadine
+napoleon
+nation
+national
+nestle
+newlife
+newyork1
+nichole
+nikita
+nikki
+nintendo
+nokia
+nomore
+normal
+norton
+noway
+nugget
+number9
+numbers
+nurse
+nutmeg
+ohshit
+oicu812
+omega
+openup
+orchid
+oreo
+orlando
+packard
+packers
+paloma
+pancake
+panic
+parola
+parrot
+partner
+pascal
+patches
+patriots
+paula
+pauline
+payton
+peach
+peanuts
+pedro1
+peggy
+perfect
+perry
+peterpan
+philips
+phillips
+phone
+pierce
+pigeon
+pink
+pioneer
+piper1
+pirate
+pisces
+playboy
+pluto
+poetry
+pontiac
+pookey
+popeye
+prayer
+precious
+prelude
+premier
+puddin
+pulsar
+pussy
+pussy1
+qwert
+qwerty12
+qwertyui
+rabbit1
+rachelle
+racoon
+rambo
+randy1
+ravens
+redman
+redskins
+reggae
+reggie
+renee
+renegade
+rescue
+revolution
+richard1
+richards
+richmond
+riley
+ripper
+robby
+roberts
+rock
+rocket1
+rockie
+rockon
+roger1
+rogers
+roland
+rommel
+rookie
+rootbeer
+rosie
+rufus
+rusty
+ruthless
+sabbath
+sabina
+safety
+saint
+samiam
+sammie
+sammy
+samsam
+sandi
+sanjose
+saphire
+sarah1
+saskia
+sassy
+saturday
+science
+scooby
+scoobydoo
+scooter1
+scorpion
+scotty
+scouts
+search
+september
+server
+seven7
+sexy
+shaggy
+shanny
+shaolin
+shasta
+shayne
+shelly
+sherry
+shirley
+shorty
+shotgun
+sidney
+simba1
+sinatra
+sirius
+skate
+skipper1
+skyler
+slayer
+sleepy
+slider
+smile1
+smitty
+smoke
+snakes
+snapper
+snoop
+solomon
+sophia
+space
+sparks
+spartan
+spike1
+sponge
+spurs
+squash
+stargate
+starlight
+stars
+steph1
+steve1
+stevens
+stewart
+stone
+stranger
+stretch
+strong
+studio
+stumpy
+sucker
+suckme
+sultan
+summit
+sunfire
+sunset
+super
+superstar
+surfing
+susan1
+sutton
+sweden
+sweetpea
+sweety
+swordfish
+tabatha
+tacobell
+taiwan
+tamtam
+tanner
+target
+tasha
+tattoo
+tequila
+terry1
+texas
+thankyou
+theend
+thompson
+thrasher
+tiger2
+timber
+timothy
+tinkerbell
+topcat
+topher
+toshiba
+tototo
+travis
+treasure
+trees
+tricky
+trish
+triton
+trombone
+trouble
+trucker
+turbo
+twins
+tyler1
+ultimate
+unique
+united
+ursula
+vacation
+valley
+vampire
+vanessa
+venice
+venus
+vermont
+vicki
+vicky
+victor1
+vincent1
+violet
+violin
+virgil
+virginia
+vision
+volley
+voodoo
+vortex
+waiting
+wanker
+warner
+water1
+wayne1
+webster
+weezer
+wendy1
+western
+white
+whitney
+whocares
+wildcat
+william1
+wilma
+window
+winniethepooh
+wolfgang
+wolverine
+wonder
+xxxxxxxx
+yamaha
+yankee
+yogibear
+yolanda
+yomama
+yvette
+zachary
+zebras
+zxcvbn
+00000000
+121212
+1234qwer
+131313
+13579
+90210
+99999999
+ABC123
+action
+amelie
+anaconda
+apollo13
+artist
+asshole
+benoit
+bernard
+bernie
+bigbird
+blizzard
+bluesky
+bonjour
+caesar
+cardinal
+carolina
+cesar
+chandler
+chapman
+charlie1
+chevy
+chiquita
+chocolat
+coco
+cougars
+courtney
+dolphins
+dominic
+donkey
+dusty
+eminem
+energy
+fearless
+forest
+forever
+glenn
+guinness
+hotdog
+indian
+jared
+jimbo
+johnson
+jojo
+josie
+kristin
+lloyd
+lorraine
+lynn
+maxime
+memory
+mimi
+mirror
+nebraska
+nemesis
+network
+nigel
+oatmeal
+patton
+pedro
+planet
+players
+portland
+praise
+psalms
+qwaszx
+raiders
+rambo1
+rancid
+shawn
+shelley
+softball
+speedo
+sports
+ssssss
+steele
+steph
+stephani
+sunday
+tiffany
+tigre
+toronto
+trixie
+undead
+valentin
+velvet
+viking
+walker
+watson
+young
+babygirl
+pretty
+hottie
+teamo
+987654321
+naruto
+spongebob
+daniela
+princesa
+christ
+blessed
+single
+qazwsx
+pokemon
+iloveyou1
+iloveyou2
+fuckyou1
+hahaha
+poop
+blessing
+blahblah
+blink182
+123qwe
+trinity
+passw0rd
+google
+looking
+spirit
+iloveyou!
+qwerty1
+onelove
+mylove
+222222
+ilovegod
+football1
+loving
+emmanuel
+1q2w3e4r
+red123
+blabla
+112233
+hallo
+spiderman
+simpsons
+monster
+november
+brooklyn
+poopoo
+darkness
+159753
+pineapple
+chester
+1qaz2wsx
+drowssap
+monkey12
+wordpass
+q1w2e3r4
+coolness
+11235813
+something
+alexandra
+estrella
+miguel
+iloveme
+sayang
+princess1
+555555
+999999
+alejandro
+brittany
+alejandra
+tequiero
+antonio
+987654
+00000
+fernando
+corazon
+cristina
+kisses
+myspace
+rebelde
+babygurl
+alyssa
+mahalkita
+gabriela
+pictures
+hellokitty
+babygirl1
+angelica
+mahalko
+mariana
+eduardo
+andres
+ronaldo
+inuyasha
+adriana
+celtic
+samsung
+angelo
+456789
+sebastian
+karina
+hotmail
+0123456789
+barcelona
+cameron
+slipknot
+cutiepie
+50cent
+bonita
+maganda
+babyboy
+natalie
+cuteako
+javier
+789456123
+123654
+bowwow
+portugal
+777777
+volleyball
+january
+cristian
+bianca
+chrisbrown
+101010
+sweet
+panget
+benfica
+love123
+lollipop
+camila
+qwertyuiop
+harrypotter
+ihateyou
+christine
+lorena
+andreea
+charmed
+rafael
+brianna
+aaliyah
+johncena
+lovelove
+gangsta
+333333
+hiphop
+mybaby
+sergio
+metallica
+myspace1
+babyblue
+badboy
+fernanda
+westlife
+sasuke
+steaua
+roberto
+slideshow
+asdfghjkl
+santiago
+jayson
+5201314
+jerome
+gandako
+gatita
+babyko
+246810
+sweetheart
+chivas
+alberto
+valeria
+nicole1
+12345678910
+leonardo
+jayjay
+liliana
+sexygirl
+232323
+amores
+anthony1
+bitch1
+fatima
+miamor
+lover
+lalala
+252525
+skittles
+colombia
+159357
+manutd
+123456a
+britney
+katrina
+christina
+pasaway
+mahal
+tatiana
+cantik
+0123456
+teiubesc
+147258369
+natalia
+francisco
+amorcito
+paola
+angelito
+manchester
+mommy1
+147258
+amigos
+marlon
+linkinpark
+147852
+diego
+444444
+iverson
+andrei
+justine
+frankie
+pimpin
+fashion
+bestfriend
+england
+hermosa
+456123
+102030
+sporting
+hearts
+potter
+iloveu2
+number1
+212121
+truelove
+jayden
+savannah
+hottie1
+ganda
+scotland
+ilovehim
+shakira
+estrellita
+brandon1
+sweets
+familia
+love12
+omarion
+monkeys
+loverboy
+elijah
+ronnie
+mamita
+999999999
+broken
+rodrigo
+westside
+mauricio
+amigas
+preciosa
+shopping
+flores
+isabella
+martinez
+elaine
+friendster
+cheche
+gracie
+connor
+valentina
+darling
+santos
+joanne
+fuckyou2
+pebbles
+sunshine1
+gangster
+gloria
+darkangel
+bettyboop
+jessica1
+cheyenne
+dustin
+iubire
+a123456
+purple1
+bestfriends
+inlove
+batista
+karla
+chacha
+marian
+sexyme
+pogiako
+jordan1
+010203
+daddy1
+daddysgirl
+billabong
+pinky
+erika
+skater
+nenita
+tigger1
+gatito
+lokita
+maldita
+buttercup
+bambam
+glitter
+123789
+sister
+zacefron
+tokiohotel
+loveya
+lovebug
+bubblegum
+marissa
+cecilia
+lollypop
+nicolas
+puppies
+ariana
+chubby
+sexybitch
+roxana
+mememe
+susana
+baller
+hotstuff
+carter
+babylove
+angelina
+playgirl
+sweet16
+012345
+bhebhe
+marcos
+loveme1
+milagros
+lilmama
+beyonce
+lovely1
+catdog
+armando
+margarita
+151515
+loves
+202020
+gerard
+undertaker
+amistad
+capricorn
+delfin
+cheerleader
+password2
+PASSWORD
+lizzie
+matthew1
+enrique
+badgirl
+141414
+dancing
+cuteme
+amelia
+skyline
+angeles
+janine
+carlitos
+justme
+legolas
+michelle1
+cinderella
+jesuschrist
+ilovejesus
+tazmania
+tekiero
+thebest
+princesita
+lucky7
+jesucristo
+buddy1
+regina
+myself
+lipgloss
+jazmin
+rosita
+chichi
+pangit
+mierda
+741852963
+hernandez
+arturo
+silvia
+melvin
+celeste
+pussycat
+gorgeous
+honeyko
+mylife
+babyboo
+loveu
+lupita
+panthers
+hollywood
+alfredo
+musica
+hawaii
+sparkle
+kristina
+sexymama
+crazy
+scarface
+098765
+hayden
+micheal
+242424
+0987654321
+marisol
+jeremiah
+mhine
+isaiah
+lolipop
+butterfly1
+xbox360
+madalina
+anamaria
+yourmom
+jasmine1
+bubbles1
+beatriz
+diamonds
+friendship
+sweetness
+desiree
+741852
+hannah1
+bananas
+julius
+leanne
+marie1
+lover1
+twinkle
+february
+bebita
+87654321
+twilight
+imissyou
+pollito
+ashlee
+cookie1
+147852369
+beckham
+simone
+nursing
+torres
+damian
+123123123
+joshua1
+babyface
+dinamo
+mommy
+juliana
+cassandra
+redsox
+gundam
+0000
+ou812
+dave
+golf
+molson
+Monday
+newpass
+thx1138
+Internet
+coke
+foobar
+abc
+fish
+fred
+help
+ncc1701d
+newuser
+none
+pat
+dog
+duck
+duke
+floyd
+guest
+joe
+kingfish
+micro
+sam
+telecom
+test1
+7777
+absolut
+babylon5
+backup
+bill
+bird33
+deliver
+fire
+flip
+galileo
+gopher
+hansolo
+jane
+jim
+mom
+passwd
+phil
+phish
+porsche911
+rain
+red
+sergei
+training
+truck
+video
+volvo
+007
+1969
+5683
+Bond007
+Friday
+Hendrix
+October
+Taurus
+aaa
+alexandr
+catalog
+challenge
+clipper
+coltrane
+cyrano
+dan
+dawn
+dean
+deutsch
+dilbert
+e-mail
+export
+ford
+fountain
+fox
+frog
+gabriell
+garlic
+goforit
+grateful
+hoops
+lady
+ledzep
+lee
+mailman
+mantra
+market
+mazda1
+metallic
+ncc1701e
+nesbitt
+open
+pete
+quest
+republic
+research
+supra
+tara
+testing
+xanadu
+xxxx
+zaphod
+zeus
+0007
+1022
+10sne1
+1973
+1978
+2000
+2222
+3bears
+Broadway
+Fisher
+Jeanne
+Killer
+Knight
+Master
+Pepper
+Sierra
+Tennis
+abacab
+abcd
+ace
+acropolis
+amy
+anders
+avenir
+basil
+bass
+beer
+ben
+bliss
+blowfish
+boss
+bridges
+buck
+bugsy
+bull
+cannondale
+canon
+catnip
+chip
+civil
+content
+cook
+cordelia
+crack1
+cyber
+daisie
+dark1
+database
+deadhead
+denali
+depeche
+dickens
+emmitt
+entropy
+farout
+farside
+feedback
+fidel
+firenze
+fish1
+fletch
+fool
+fozzie
+fun
+gargoyle
+gasman
+gold
+graphic
+hell
+image
+intern
+intrepid
+jeff
+jkl123
+joel
+johanna1
+kidder
+kim
+king
+kirk
+kris
+lambda
+leon
+logical
+lorrie
+major
+mariner
+mark1
+max
+media
+merlot
+midway
+mine
+mmouse
+moon
+mopar
+mortimer
+nermal
+nina
+olsen
+opera
+overkill
+pacers
+packer
+picard
+polar
+polo
+primus
+prometheus
+public
+radio
+rastafarian
+reptile
+rob
+robotech
+rodeo
+rolex
+rouge
+roy
+ruby
+salasana
+scarecrow
+scout
+scuba1
+sergey
+skibum
+skunk
+sound
+starter
+sting1
+sunbird
+tbird
+teflon
+temporal
+terminal
+the
+thejudge
+time
+toby
+today
+tokyo
+tree
+trout
+vader
+val
+valhalla
+windsurf
+wolf
+wolf1
+xcountry
+yoda
+yukon
+1213
+1214
+1225
+1313
+1818
+1975
+1977
+1991
+1kitty
+2001
+2020
+2112
+2kids
+333
+4444
+5050
+57chevy
+7dwarfs
+Animals
+Ariel
+Bismillah
+Booboo
+Boston
+Carol
+Computer
+Creative
+Curtis
+Denise
+Eagles
+Esther
+Fishing
+Freddy
+Gandalf
+Golden
+Goober
+Hacker
+Harley
+Henry
+Hershey
+Jackson
+Jersey
+Joanna
+Johnson
+Katie
+Kitten
+Liberty
+Lindsay
+Lizard
+Madeline
+Margaret
+Maxwell
+Money
+Monster
+Pamela
+Peaches
+Peter
+Phoenix
+Piglet
+Pookie
+Rabbit
+Raiders
+Random
+Russell
+Sammy
+Saturn
+Skeeter
+Smokey
+Sparky
+Speedy
+Sterling
+Theresa
+Thunder
+Vincent
+Willow
+Winnie
+Wolverine
+aaaa
+aardvark
+abbott
+acura
+admin
+admin1
+adrock
+aerobics
+agent
+airwolf
+ali
+alien
+allegro
+allstate
+altamira
+altima1
+andrew!
+ann
+anne
+anneli
+aptiva
+arrow
+asdf;lkj
+assmunch
+baraka
+barnyard
+bart
+bartman
+beasty
+beavis1
+bebe
+belgium
+beowulf
+beryl
+best
+bharat
+bichon
+bigal
+biker
+bilbo
+bills
+bimmer
+biochem
+birdy
+blinds
+blitz
+bluejean
+bogey
+bogus
+boulder
+bourbon
+boxer
+brain
+branch
+britain
+broker
+bucks
+buffett
+bugs
+bulls
+burns
+buzz
+c00per
+calgary
+camay
+carl
+cat
+cement
+cessna
+chad
+chainsaw
+chameleon
+chang
+chess
+chinook
+chouette
+chronos
+cicero
+circuit
+cirque
+cirrus
+clapton
+clarkson
+class
+claudel
+cleo
+cliff
+clock
+color
+comet
+concept
+concorde
+coolbean
+corky
+cornflake
+corwin
+cows
+crescent
+cross
+crowley
+cthulhu
+cunt
+current
+cutlass
+daedalus
+dagger1
+daily
+dale
+dana
+daytek
+dead
+decker
+dharma
+dillweed
+dipper
+disco
+dixon
+doitnow
+doors
+dork
+doug
+dutch
+effie
+ella
+elsie
+engage
+eric1
+ernie1
+escort1
+excel
+faculty
+fairview
+faust
+fenris
+finance
+first
+fishhead
+flanders
+fleurs
+flute
+flyboy
+flyer
+franka
+frederic
+free
+front242
+frontier
+fugazi
+funtime
+gaby
+gaelic
+gambler
+gammaphi
+garfunkel
+garth
+gary
+gateway2
+gator1
+gibbons
+gigi
+gilgamesh
+goat
+godiva
+goethe
+gofish
+good
+gramps
+gravis
+gray
+greed
+greg
+greg1
+greta
+gretzky
+guido
+gumby
+h2opolo
+hamid
+hank
+hawkeye1
+health1
+hello8
+help123
+helper
+homerj
+hoosier
+hope
+huang
+hugo
+hydrogen
+ib6ub9
+insight
+instructor
+integral
+iomega
+iris
+izzy
+jazz
+jean
+jeepster
+jetta1
+joanie
+josee
+joy
+julia2
+jumbo
+jump
+justice4
+kalamazoo
+kali
+kat
+kate
+kerala
+kids
+kiwi
+kleenex
+kombat
+lamer
+laser
+laserjet
+lassie1
+leblanc
+legal
+leo
+life
+lions
+liz
+logger
+logos
+loislane
+loki
+longer
+lori
+lost
+lotus
+lou
+macha
+macross
+madoka
+makeitso
+mallard
+marc
+math
+mattingly
+mechanic
+meister
+mercer
+merde
+merrill
+michal
+michou
+mickel
+minou
+mobydick
+modem
+mojo
+montana3
+montrose
+motor
+mowgli
+mulder1
+muscle
+neil
+neutrino
+newaccount
+nicklaus
+nightshade
+nightwing
+nike
+none1
+nopass
+nouveau
+novell
+oaxaca
+obiwan
+obsession
+orville
+otter
+ozzy
+packrat
+paint
+papa
+paradigm
+pass
+pavel
+peterk
+phialpha
+phishy
+piano1
+pianoman
+pianos
+pipeline
+plato
+play
+poetic
+print
+printing
+provider
+qqq111
+quebec
+qwer
+racer
+racerx
+radar
+rafiki
+raleigh
+rasta1
+redcloud
+redfish
+redwing
+redwood
+reed
+rene
+reznor
+rhino
+ripple
+rita
+robocop
+robotics
+roche
+roni
+rossignol
+rugger
+safety1
+saigon
+satori
+saturn5
+schnapps
+scotch
+scuba
+secret3
+seeker
+services
+sex
+shanghai
+shazam
+shelter
+sigmachi
+signal
+signature
+simsim
+skydive
+slick
+smegma
+smiths
+smurfy
+snow
+sober1
+sonics
+sony
+spazz
+sphynx
+spock
+spoon
+spot
+sprocket
+starbuck
+steel
+stephi
+sting
+stocks
+storage
+strat
+strato
+stud
+student2
+susanna
+swanson
+swim
+switzer
+system5
+t-bone
+talon
+tarheel
+tata
+tazdevil
+tester
+testtest
+thisisit
+thorne
+tightend
+tim
+tom
+tool
+total
+toucan
+transfer
+transit
+transport
+trapper
+trash
+trophy
+tucson
+turbo2
+unity
+upsilon
+vedder
+vette
+vikram
+virago
+visual
+volcano
+walden
+waldo
+walleye
+webmaster
+wedge
+whale1
+whit
+whoville
+wibble
+will
+wombat1
+word
+world
+x-files
+xxx123
+zack
+zepplin
+zoltan
+zoomer
+123go
+21122112
+5555
+911
+FuckYou
+Fuckyou
+Gizmo
+Hello
+Michel
+Qwerty
+Windows
+angus
+aspen
+ass
+bird
+booster
+byteme
+cats
+changeit
+christia
+christoph
+classroom
+cloclo
+corrado
+dasha
+fiction
+french1
+fubar
+gator
+gilles
+gocougs
+hilbert
+hola
+home
+judy
+koko
+lulu
+mac
+macintosh
+mailer
+mars
+meow
+ne1469
+niki
+paul
+politics
+pomme
+property
+ruth
+sales
+salut
+scrooge
+skidoo
+spain
+surf
+sylvie
+symbol
+forum
+rotimi
+god
+saved
+2580
+1998
+xxx
+1928
+777
+info
+a
+netware
+sun
+tech
+doom
+mmm
+one
+ppp
+1911
+1948
+1996
+5252
+Champs
+Tuesday
+bach
+crow
+don
+draft
+hal9000
+herzog
+huey
+jethrotull
+jussi
+mail
+miki
+nicarao
+snowski
+1316
+1412
+1430
+1952
+1953
+1955
+1956
+1960
+1964
+1qw23e
+2200
+2252
+3010
+3112
+4788
+6262
+Alpha
+Bastard
+Beavis
+Cardinal
+Celtics
+Cougar
+Darkman
+Figaro
+Fortune
+Geronimo
+Hammer
+Homer
+Janet
+Mellon
+Merlot
+Metallic
+Montreal
+Newton
+Paladin
+Peanuts
+Service
+Vernon
+Waterloo
+Webster
+aki123
+aqua
+aylmer
+beta
+bozo
+car
+chat
+chinacat
+cora
+courier
+dogbert
+eieio
+elina1
+fly
+funguy
+fuzz
+ggeorge
+glider1
+gone
+hawk
+heikki
+histoire
+hugh
+if6was9
+ingvar
+jan
+jedi
+jimi
+juhani
+khan
+lima
+midvale
+neko
+nesbit
+nexus6
+nisse
+notta1
+pam
+park
+pole
+pope
+pyro
+ram
+reliant
+rex
+rush
+seoul
+skip
+stan
+sue
+suzy
+tab
+testi
+thelorax
+tika
+tnt
+toto1
+tre
+wind
+x-men
+xyz
+zxc
+369
+Abcdef
+Asdfgh
+Changeme
+NCC1701
+Zxcvbnm
+demo
+doom2
+good-luck
+homebrew
+m1911a1
+nat
+ne1410s
+ne14a69
+zhongguo
+sample123
+0852
+basf
+OU812
+!@#$%
+informix
+majordomo
+news
+temp
+trek
+!@#$%^
+!@#$%^&*
+Pentium
+Raistlin
+adi
+bmw
+law
+new
+opus
+plus
+visa
+www
+zzz
+1332
+1950
+3141
+3533
+4055
+4854
+6301
+Bonzo
+ChangeMe
+Front242
+Gretel
+Michel1
+Noriko
+Sidekick
+Sverige
+Swoosh
+Woodrow
+ayelet
+barn
+betacam
+biz
+boat
+cuda
+doc
+hal
+hallowell
+haro
+hosehead
+ilmari
+irmeli
+j1l2t3
+jer
+kcin
+kerrya
+kissa2
+leaf
+lissabon
+mart
+matti1
+mech
+morecats
+paagal
+performa
+prof
+ratio
+ship
+slip
+stivers
+tapani
+targas
+test2
+test3
+tula
+unix
+user1
+xanth
+!@#$%^&
+1701d
+@#$%^&
+Qwert
+allo
+dirk
+newcourt
+nite
+notused
+sss

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2012-04-30 06:36:01 +0000
+++ b/sql/sql_acl.cc	2012-05-10 10:54:37 +0000
@@ -9927,7 +9927,7 @@ int check_password_strength(String *pass
     st_mysql_validate_password *password_strength=
                       (st_mysql_validate_password *) plugin_decl(plugin)->info;
 
-    res= password_strength->validate_password_strength(password);
+    res= password_strength->get_password_strength(password, password->length());
     plugin_unlock(0, plugin);
   }
   return(res);
@@ -9944,8 +9944,66 @@ void check_password_policy(String *passw
     st_mysql_validate_password *password_validate=
                       (st_mysql_validate_password *) plugin_decl(plugin)->info;
 
-    if (!password_validate->validate_password(password))
+    if (!password_validate->validate_password(password, password->length()))
       my_error(ER_NOT_VALID_PASSWORD, MYF(0), password->ptr());
     plugin_unlock(0, plugin);
   }
 }
+
+/* This function provide plugin service for calculating number of 
+   upper_case, lower_case, digits. Calculation depends on the
+   client character set.
+*/ 
+extern "C"
+void password_string_case(PASSWORD_CHAR_CASE *chars_case, void *password)
+{
+  String *password_str= (String *) password;
+  const CHARSET_INFO *cs= password_str->charset();
+  char *beg= (char*) password_str->ptr();
+  char *end= (char*) password_str->ptr() + password_str->length();
+  while (beg < end)
+  {
+    int ctype, char_len;
+    char_len= cs->cset->ctype(cs, &ctype, (uchar*) beg, (uchar*) end);
+    if (ctype & _MY_NMR)
+      chars_case->has_numbers++;
+    else if (ctype & _MY_L)
+      chars_case->has_lower++;
+    else if (ctype & _MY_U)
+      chars_case->has_upper++;
+    else
+      chars_case->has_special_chars++;
+    beg+= (char_len > 0 ? char_len : (char_len < 0 ? -char_len : 1));
+  }
+}
+
+/* This function provide plugin service to convert a String into
+   lower case. Conversion depends on the clinet character set info
+*/
+extern "C"
+const char *password_string_casedn(void *password)
+{
+  String *password_str= (String *) password;
+  const CHARSET_INFO *cs= password_str->charset();
+  String tmp_password_str;
+  if (cs->casedn_multiply == 1)
+  {
+    uint len;
+    len= cs->cset->casedn(cs, (char*) password_str->ptr(),
+                          password_str->length(), (char*) password_str->ptr(),
+                          password_str->length());
+    password_str->length(len);
+  }
+  else
+  {
+    uint len= password_str->length() * cs->casedn_multiply;
+    tmp_password_str.alloc(len);
+    tmp_password_str.set_charset(cs);
+    len= cs->cset->casedn(cs, (char*) password_str->ptr(),
+                          password_str->length(),
+                          (char*) tmp_password_str.ptr(), len);
+    tmp_password_str.length(len);
+    password_str= &tmp_password_str;
+  }
+  return password_str->ptr();
+}

=== modified file 'sql/sql_plugin.h'
--- a/sql/sql_plugin.h	2012-04-30 06:36:01 +0000
+++ b/sql/sql_plugin.h	2012-05-10 10:54:37 +0000
@@ -135,7 +135,7 @@ typedef struct st_plugin_int **plugin_re
 typedef int (*plugin_type_init)(struct st_plugin_int *);
 
 extern I_List<i_string> *opt_plugin_load_list_ptr;
-extern MYSQL_PLUGIN_IMPORT char *opt_plugin_dir_ptr;
+extern char *opt_plugin_dir_ptr;
 extern char opt_plugin_dir[FN_REFLEN];
 extern const LEX_STRING plugin_type_names[];
 extern int plugin_init(int *argc, char **argv, int init_flags);

=== modified file 'sql/sql_plugin_services.h'
--- a/sql/sql_plugin_services.h	2011-06-30 15:50:45 +0000
+++ b/sql/sql_plugin_services.h	2012-05-10 10:54:37 +0000
@@ -50,6 +50,10 @@ static struct my_plugin_log_service my_p
   my_plugin_log_message
 };
 
+static struct password_string_service_st password_string_handler= {
+  password_string_case,
+  password_string_casedn,
+};
 
 
 static struct st_service_ref list_of_services[]=
@@ -60,5 +64,7 @@ static struct st_service_ref list_of_ser
   { "my_thread_scheduler_service",
     VERSION_my_thread_scheduler, &my_thread_scheduler_handler },
   { "my_plugin_log_service", VERSION_my_plugin_log, &my_plugin_log_handler },
+  { "password_string_service",
+    VERSION_password_string, &password_string_handler },
 };
 

=== modified file 'support-files/CMakeLists.txt'
--- a/support-files/CMakeLists.txt	2012-03-23 10:32:33 +0000
+++ b/support-files/CMakeLists.txt	2012-05-10 10:54:37 +0000
@@ -32,6 +32,8 @@ ELSE()
   SET(HOSTNAME "hostname")
 ENDIF()
 
+  SET(dictionary "${CMAKE_INSTALL_PREFIX}/${INSTALL_SHAREDIR}/dictionary.txt" )
+
 # XXX: shouldn't we just have variables for all this stuff and centralise
 # XXX: their configuration in install_layout.cmake?
 IF(WIN32)

=== modified file 'support-files/my-huge.cnf.sh'
--- a/support-files/my-huge.cnf.sh	2010-11-19 13:56:08 +0000
+++ b/support-files/my-huge.cnf.sh	2012-05-10 10:54:37 +0000
@@ -127,6 +127,9 @@ server-id	= 1
 #innodb_flush_log_at_trx_commit = 1
 #innodb_lock_wait_timeout = 50
 
+# dictionary file for validate_password plugin
+validate_password_dictionary_file = @dictionary@
+
 [mysqldump]
 quick
 max_allowed_packet = 16M

=== modified file 'support-files/my-large.cnf.sh'
--- a/support-files/my-large.cnf.sh	2010-11-19 13:56:08 +0000
+++ b/support-files/my-large.cnf.sh	2012-05-10 10:54:37 +0000
@@ -127,6 +127,9 @@ server-id	= 1
 #innodb_flush_log_at_trx_commit = 1
 #innodb_lock_wait_timeout = 50
 
+# dictionary file for validate_password plugin
+validate_password_dictionary_file = @dictionary@
+
 [mysqldump]
 quick
 max_allowed_packet = 16M

=== modified file 'support-files/my-medium.cnf.sh'
--- a/support-files/my-medium.cnf.sh	2010-11-19 13:56:08 +0000
+++ b/support-files/my-medium.cnf.sh	2012-05-10 10:54:37 +0000
@@ -125,6 +125,9 @@ server-id	= 1
 #innodb_flush_log_at_trx_commit = 1
 #innodb_lock_wait_timeout = 50
 
+# dictionary file for validate_password plugin
+validate_password_dictionary_file = @dictionary@
+
 [mysqldump]
 quick
 max_allowed_packet = 16M

=== modified file 'support-files/my-small.cnf.sh'
--- a/support-files/my-small.cnf.sh	2010-11-19 13:59:45 +0000
+++ b/support-files/my-small.cnf.sh	2012-05-10 10:54:37 +0000
@@ -72,6 +72,9 @@ server-id	= 1
 #innodb_flush_log_at_trx_commit = 1
 #innodb_lock_wait_timeout = 50
 
+# dictionary file for validate_password plugin
+validate_password_dictionary_file = @dictionary@
+
 [mysqldump]
 quick
 max_allowed_packet = 16M

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (ashish.y.agarwal:3883 to 3884) Ashish Agarwal7 Jun