[patch] File/Passwd.php use CRYPT_SALT_LENGTH (fwd)
| From: | James E. Flemer | Date: | Mon, 08 Jul 2002 17:04:50 +0000 |
| Subject: | [patch] File/Passwd.php use CRYPT_SALT_LENGTH (fwd) | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-7571@lists.php.net to get a copy of this message | ||
[ Please CC me on replies, I am not on pear-dev. ]
Hmmm, maybe this should have gone to pear-dev.
-james
---------- Forwarded message ----------
Date: Tue, 2 Jul 2002 16:47:40 -0400 (EDT)
From: James E. Flemer <jflemer@acm.jhu.edu>
To: pear-general@lists.php.net
Subject: [patch] File/Passwd.php use CRYPT_SALT_LENGTH
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()