summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Phillips2008-10-20 11:57:57 (GMT)
committer Chad Phillips2008-10-20 11:57:57 (GMT)
commit0d7c427636b4387dcf5ff3c9e55d2f2f3b7786fa (patch)
tree0ed5256758228831743188786ff291114d4b9ab9
parent2b1164f6457ab27a302a3ae6169cfbc908b4ab3c (diff)
#320162 by xurizaemon: LoginToboggan prevents use of spaces in passwords, breaking passphrase functionality.
-rwxr-xr-xlogintoboggan.module5
1 files changed, 2 insertions, 3 deletions
diff --git a/logintoboggan.module b/logintoboggan.module
index e17088b..15c18c6 100755
--- a/logintoboggan.module
+++ b/logintoboggan.module
@@ -249,7 +249,7 @@ function logintoboggan_form_alter(&$form, $form_state, $form_id) {
if ($pass) {
$min_pass = variable_get('logintoboggan_minimum_password_length', 0);
$length = $min_pass ? t('between !min and', array('!min' => $min_pass)) : t('no more than');
- $form['pass']['#description'] = t('Please choose a password for your account; it must be !length 30 characters and spaces are not allowed.', array('!length' => $length));
+ $form['pass']['#description'] = t('Please choose a password for your account; it must be !length 30 characters.', array('!length' => $length));
}
}
break;
@@ -814,8 +814,7 @@ function logintoboggan_destination() {
*/
function logintoboggan_validate_pass($pass) {
if (!strlen($pass)) return t('You must enter a password.');
- if (ereg(' ', $pass)) return t('The password cannot contain spaces.');
- if (ereg("[^\x80-\xF7[:graph:]]", $pass)) return t('The password contains an illegal character.');
+ if (ereg("[^\x80-\xF7[:graph:] ]", $pass)) return t('The password contains an illegal character.');
if (preg_match('/[\x{80}-\x{A0}'. // Non-printable ISO-8859-1 + NBSP
'\x{AD}'. // Soft-hyphen
'\x{2000}-\x{200F}'. // Various space characters