summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-12 09:59:47 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-12 09:59:47 +0100
commite2fb34028980910e006f09b4fd93c4172f79b306 (patch)
treeb7e8c2a2b63e652ae13ea6799c6e737728f6b5ed
parent743832fc51cbb6d8759cebf117e093788782223e (diff)
Remove obsolete mt_srand() calls
-rw-r--r--plugins/password/drivers/ldap.php3
-rw-r--r--program/lib/Roundcube/rcube_user.php1
2 files changed, 0 insertions, 4 deletions
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index a11c38d17..6ed5ada04 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -289,7 +289,6 @@ class rcube_ldap_password
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 @@ class rcube_ldap_password
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 @@ class rcube_ldap_password
{
$possible = '0123456789' . 'abcdefghijklmnopqrstuvwxyz' . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . './';
$str = '';
- // mt_srand((double)microtime() * 1000000);
while (strlen($str) < $length) {
$str .= substr($possible, (rand() % strlen($possible)), 1);
diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php
index 1a61efd5e..8ed34fc28 100644
--- a/program/lib/Roundcube/rcube_user.php
+++ b/program/lib/Roundcube/rcube_user.php
@@ -242,7 +242,6 @@ class rcube_user
// 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']));
}