Update# 6 chars of uppercase and digits should be enough for

verification
This commit is contained in:
Pellaeon Lin 2016-06-26 15:27:47 +08:00
parent 20bb45121e
commit bd067ed85f
1 changed files with 1 additions and 3 deletions

View File

@ -21,9 +21,7 @@ class PendingRegist {
$query = $this->db->prepareQuery( 'INSERT INTO `*PREFIX*registration`'
.' ( `email`, `token`, `requested` ) VALUES( ?, ?, NOW() )' );
do {
$token = $this->random->generate(30);
} while (preg_match('/[\/]++/', $token));
$token = $this->random->generate(6, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS);
$query->execute(array( $email, $token ));
return $token;