--- logintoboggan.orig 2008-10-14 16:31:00.000000000 +1300 +++ logintoboggan.module 2008-10-15 10:27:44.000000000 +1300 @@ -225,7 +225,7 @@ if ($pass) { $min_pass = variable_get('toboggan_min_pass_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; @@ -721,8 +721,7 @@ */ 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