From: Michael M Slusarz Date: Sat, 19 Dec 2009 19:23:45 +0000 (-0700) Subject: Improvements to random ID generation X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a74f87570ca6afe684ba6495ec801c29ede1b38d;p=horde.git Improvements to random ID generation --- diff --git a/framework/Mime/lib/Horde/Mime.php b/framework/Mime/lib/Horde/Mime.php index 211a2294d..fa7923929 100644 --- a/framework/Mime/lib/Horde/Mime.php +++ b/framework/Mime/lib/Horde/Mime.php @@ -591,7 +591,7 @@ class Horde_Mime */ static public function generateRandomId($length = 24) { - return substr(base_convert(dechex(strtr(microtime(), array('0.' => '', ' ' => ''))) . uniqid(mt_rand(), true), 16, 36), $length); + return substr(base_convert(dechex(strtr(microtime(), array('0.' => '', ' ' => ''))) . strtr(uniqid(mt_rand(), true), array('.' => '')), 16, 36), 0, $length); } /**