Thomas Bruederli
2015-03-12 e2fb34028980910e006f09b4fd93c4172f79b306
Remove obsolete mt_srand() calls
2 files modified
4 ■■■■ changed files
plugins/password/drivers/ldap.php 3 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_user.php 1 ●●●● patch | view | raw | blame | history
plugins/password/drivers/ldap.php
@@ -289,7 +289,6 @@
            break;
        case 'ssha':
            mt_srand((double) microtime() * 1000000);
            $salt = substr(pack('h*', md5(mt_rand())), 0, 8);
            if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
@@ -316,7 +315,6 @@
        case 'smd5':
            mt_srand((double) microtime() * 1000000);
            $salt = substr(pack('h*', md5(mt_rand())), 0, 8);
            if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
@@ -373,7 +371,6 @@
    {
        $possible = '0123456789' . 'abcdefghijklmnopqrstuvwxyz' . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . './';
        $str = '';
        // mt_srand((double)microtime() * 1000000);
        while (strlen($str) < $length) {
            $str .= substr($possible, (rand() % strlen($possible)), 1);
program/lib/Roundcube/rcube_user.php
@@ -242,7 +242,6 @@
        // generate a random hash and store it in user prefs
        if (empty($prefs['client_hash'])) {
            mt_srand((double)microtime() * 1000000);
            $prefs['client_hash'] = md5($this->data['username'] . mt_rand() . $this->data['mail_host']);
            $this->save_prefs(array('client_hash' => $prefs['client_hash']));
        }