Changeset 247 for trunk/lib/Auth_SQL.inc.php
- Timestamp:
- Apr 5, 2007 1:48:45 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Auth_SQL.inc.php
r229 r247 621 621 622 622 if ($this->getParam('blocking')) { 623 if ( strlen($db->escapeString($reason)) > 255) {623 if (mb_strlen($db->escapeString($reason)) > 255) { 624 624 // blocked_reason field is varchar(255). 625 625 $app->logMsg(sprintf('Blocked reason provided is greater than 255 characters: %s', $reason), LOG_WARNING, __FILE__, __LINE__); … … 726 726 } 727 727 $str = ''; 728 for ($i=0; $i< strlen($pattern); $i++) {729 $x = substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZaeiouyAEIOUY0123456789', (mt_rand() % 60), 1);730 $c = substr('bcdfghjklmnprstvwxz', (mt_rand() % 19), 1);731 $C = substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZ', (mt_rand() % 38), 1);732 $v = substr('aeiouy', (mt_rand() % 6), 1);733 $V = substr('aeiouyAEIOUY', (mt_rand() % 12), 1);734 $d = substr('0123456789', (mt_rand() % 10), 1);728 for ($i=0; $i<mb_strlen($pattern); $i++) { 729 $x = mb_substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZaeiouyAEIOUY0123456789', (mt_rand() % 60), 1); 730 $c = mb_substr('bcdfghjklmnprstvwxz', (mt_rand() % 19), 1); 731 $C = mb_substr('bcdfghjklmnprstvwxzBCDFGHJKLMNPRSTVWXZ', (mt_rand() % 38), 1); 732 $v = mb_substr('aeiouy', (mt_rand() % 6), 1); 733 $V = mb_substr('aeiouyAEIOUY', (mt_rand() % 12), 1); 734 $d = mb_substr('0123456789', (mt_rand() % 10), 1); 735 735 $str .= $$pattern{$i}; 736 736 } … … 756 756 case AUTH_ENCRYPT_CRYPT : 757 757 // If comparing plaintext password with a hash, provide first two chars of the hash as the salt. 758 return isset($salt) ? crypt($password, substr($salt, 0, 2)) : crypt($password);758 return isset($salt) ? crypt($password, mb_substr($salt, 0, 2)) : crypt($password); 759 759 break; 760 760
Note: See TracChangeset
for help on using the changeset viewer.