cvs: pear /Text_Password Password.php package.xml

From: Date: Sun, 21 Aug 2005 19:39:51 +0000
Subject: cvs: pear /Text_Password Password.php package.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-34202@lists.php.net to get a copy of this message
mj Sun Aug 21 15:39:51 2005 EDT Modified files: /pear/Text_Password Password.php package.xml Log: * The way we were using mt_srand() in there is problematic, if not outright wrong. Thus we rely on PHP seeding the randon number generator properly, which means that Text_Password now depends on PHP >= 4.2.0. # Hint by Stefan Esser via Tobias Schlitt. http://cvs.php.net/diff.php/pear/Text_Password/Password.php?r1=1.13&r2=1.14&ty=u Index: pear/Text_Password/Password.php diff -u pear/Text_Password/Password.php:1.13 pear/Text_Password/Password.php:1.14 --- pear/Text_Password/Password.php:1.13 Sun Jan 23 06:09:42 2005 +++ pear/Text_Password/Password.php Sun Aug 21 15:39:49 2005 @@ -17,7 +17,7 @@ // | Olivier Vanhoucke <olivier@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Password.php,v 1.13 2005/01/23 11:09:42 olivier Exp $ +// $Id: Password.php,v 1.14 2005/08/21 19:39:49 mj Exp $ // /** @@ -47,8 +47,6 @@ */ function create($length = 10, $type = 'pronounceable', $chars = '') { - mt_srand((double) microtime() * 1000000); - switch ($type) { case 'unpronounceable' : return Text_Password::_createUnpronounceable($length, $chars); http://cvs.php.net/diff.php/pear/Text_Password/package.xml?r1=1.12&r2=1.13&ty=u Index: pear/Text_Password/package.xml diff -u pear/Text_Password/package.xml:1.12 pear/Text_Password/package.xml:1.13 --- pear/Text_Password/package.xml:1.12 Sun Oct 31 17:40:50 2004 +++ pear/Text_Password/package.xml Sun Aug 21 15:39:49 2005 @@ -26,13 +26,15 @@ <release> <version>1.1</version> <state>stable</state> - <date>2004-XX-XX</date> + <date>2005-XX-XX</date> <notes> * Improved performance * Added alphabetical character set for creating passwords (by Aaron Wormus) * Added a method to determine if a password is well chosen * Added unit tests * Fixed bug #2605 +* Fixed problematic seeding of the randon number generator (hint by + Stefan Esser) </notes> <filelist> <file role="php" baseinstalldir="Text">Password.php</file> @@ -40,5 +42,8 @@ <file role="test">Text_Password_Test.php</file> </dir> </filelist> + <deps> + <dep type="php" rel="ge" version="4.2.0" /> + </deps> </release> </package>

« previous php.pear.cvs (#34202) next »