From: Michael M Slusarz Date: Wed, 12 Jan 2011 09:10:09 +0000 (-0700) Subject: Bug #9484: Ensure we always get 23 character string X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ab016a2ca49a6900aeb33d5c7f9a6ce2bade3ad4;p=horde.git Bug #9484: Ensure we always get 23 character string --- diff --git a/framework/Support/lib/Horde/Support/Randomid.php b/framework/Support/lib/Horde/Support/Randomid.php index 815e6ebaa..f1b3bbc53 100644 --- a/framework/Support/lib/Horde/Support/Randomid.php +++ b/framework/Support/lib/Horde/Support/Randomid.php @@ -48,7 +48,7 @@ class Horde_Support_Randomid { // Base64 can have /, +, and = characters. Restrict to URL-safe characters. return str_replace(array('/', '+', '='), array('-', '_', ''), base64_encode( - pack('II', mt_rand(), crc32(php_uname('n'))) . pack('H*', uniqid() . dechex(getmypid())) + pack('II', mt_rand(), crc32(php_uname('n'))) . pack('H*', uniqid() . sprintf('%04s', dechex(getmypid()))) )); }