[patch] File/Passwd.php use CRYPT_SALT_LENGTH

From: Date: Tue, 02 Jul 2002 20:47:40 +0000
Subject: [patch] File/Passwd.php use CRYPT_SALT_LENGTH
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1794@lists.php.net to get a copy of this message
Here's a tiny patch for pear/File/Passwd.php to make it respect CRYPT_SALT_LENGTH. This makes it behave better on some systems, and shouldn't break anything. -James Index: Passwd.php =================================================================== RCS file: /repository/php4/pear/File/Passwd.php,v retrieving revision 1.10 diff -u -r1.10 Passwd.php --- Passwd.php 17 Apr 2002 14:41:37 -0000 1.10 +++ Passwd.php 2 Jul 2002 20:43:26 -0000 @@ -179,7 +179,7 @@ */ function verifyPassword($user, $pass) { if(isset($this->users[$user])) { - if($this->users[$user] == crypt($pass, substr($this->users[$user], 0, 2))) return true; + if($this->users[$user] == crypt($pass, substr($this->users[$user], 0, CRYPT_SALT_LENGTH))) return true; } return false; } // end func verifyPassword()

« previous php.pear.general (#1794) next »