cvs: php4 /pear/File Passwd.php
| From: | Martin Jansen | Date: | Mon, 26 Nov 2001 11:41:17 +0000 |
| Subject: | cvs: php4 /pear/File Passwd.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1406@lists.php.net to get a copy of this message | ||
mj Mon Nov 26 06:41:17 2001 EDT
Modified files:
/php4/pear/File Passwd.php
Log:
* Strip withespace from beginning and end of passwords.
Index: php4/pear/File/Passwd.php
diff -u php4/pear/File/Passwd.php:1.4 php4/pear/File/Passwd.php:1.5
--- php4/pear/File/Passwd.php:1.4 Fri Jul 13 13:56:50 2001
+++ php4/pear/File/Passwd.php Mon Nov 26 06:41:17 2001
@@ -16,7 +16,7 @@
// | Authors: Rasmus Lerdorf <rasmus@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Passwd.php,v 1.4 2001/07/13 17:56:50 mj Exp $
+// $Id: Passwd.php,v 1.5 2001/11/26 11:41:17 mj Exp $
//
// Manipulate standard UNIX passwd,.htpasswd and CVS pserver passwd files
@@ -88,8 +88,8 @@
$this->lockfile = $lockfile ;
}
- $this->fplock = fopen($this->lockfile, 'w');
if($lock) {
+ $this->fplock = fopen($this->lockfile, 'w');
flock($this->fplock, LOCK_EX);
$this->locked = true;
}
@@ -102,7 +102,7 @@
$line = fgets($fp, 128);
list($user,$pass,$cvsuser) = explode(':',$line);
if(strlen($user)) {
- $this->users[$user] = $pass;
+ $this->users[$user] = trim($pass);
$this->cvs[$user] = trim($cvsuser);
}
}