diff options
author | David M <davidmj@users.sourceforge.net> | 2007-04-28 00:46:31 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-04-28 00:46:31 +0000 |
commit | 7fcfd0c17d0f53ce4f196c881f9ace9d184d7777 (patch) | |
tree | dd6abaae5eb51cf32580bbfeb0b1561b1abb8ae8 /phpBB/includes/functions_user.php | |
parent | f5e0f060cd50cf3099d6e5cc12d8b390ed3b57ce (diff) | |
download | forums-7fcfd0c17d0f53ce4f196c881f9ace9d184d7777.tar forums-7fcfd0c17d0f53ce4f196c881f9ace9d184d7777.tar.gz forums-7fcfd0c17d0f53ce4f196c881f9ace9d184d7777.tar.bz2 forums-7fcfd0c17d0f53ce4f196c881f9ace9d184d7777.tar.xz forums-7fcfd0c17d0f53ce4f196c881f9ace9d184d7777.zip |
#10185
git-svn-id: file:///svn/phpbb/trunk@7413 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index bbd2d070cb..81f0433f1a 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1348,6 +1348,7 @@ function validate_password($password) { $upp = '\p{Lu}'; $low = '\p{Ll}'; + $let = '\p{L}'; $num = '\p{N}'; $sym = '[^\p{Lu}\p{Ll}\p{N}]'; $pcre = true; @@ -1357,6 +1358,7 @@ function validate_password($password) mb_regex_encoding('UTF-8'); $upp = '[[:upper:]]'; $low = '[[:lower:]]'; + $let = '[[:lower:][:upper:]]'; $num = '[[:digit:]]'; $sym = '[^[:upper:][:lower:][:digit:]]'; $mbstring = true; @@ -1365,6 +1367,7 @@ function validate_password($password) { $upp = '[A-Z]'; $low = '[a-z]'; + $let = '[a-zA-Z]'; $num = '[0-9]'; $sym = '[^A-Za-z0-9]'; $pcre = true; @@ -1380,8 +1383,7 @@ function validate_password($password) break; case 'PASS_TYPE_ALPHA': - $chars[] = $low; - $chars[] = $upp; + $chars[] = $let; $chars[] = $num; break; @@ -1398,7 +1400,7 @@ function validate_password($password) foreach ($chars as $char) { if (!preg_match('#' . $char . '#u', $password)) - { + {var_dump($char, $password); return 'INVALID_CHARS'; } } |