cvs: php-master-web /include cvs-auth.inc
| From: | Gabor Hojtsy | Date: | Fri, 05 Sep 2003 10:06:36 +0000 |
| Subject: | cvs: php-master-web /include cvs-auth.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20784@lists.php.net to get a copy of this message | ||
goba Fri Sep 5 06:06:36 2003 EDT
Modified files:
/php-master-web/include cvs-auth.inc
Log:
Do not allow an infinite loop when file is not available for opening
Index: php-master-web/include/cvs-auth.inc
diff -u php-master-web/include/cvs-auth.inc:1.1 php-master-web/include/cvs-auth.inc:1.2
--- php-master-web/include/cvs-auth.inc:1.1 Sat Sep 22 19:52:50 2001
+++ php-master-web/include/cvs-auth.inc Fri Sep 5 06:06:36 2003
@@ -1,5 +1,5 @@
<?php
-/* $Id: cvs-auth.inc,v 1.1 2001/09/22 23:52:50 jimw Exp $ */
+/* $Id: cvs-auth.inc,v 1.2 2003/09/05 10:06:36 goba Exp $ */
$ignore_password = false;
$passwd_file = "/repository/CVSROOT/passwd";
@@ -7,7 +7,8 @@
function find_password($user) {
global $passwd_file, $ignore_password;
if ($ignore_password) return " "; // can't be ""
- $fp=fopen($passwd_file,"r");
+ $fp = fopen($passwd_file, "r");
+ if (!$fp) { die("unable to open CVS users file"); }
while(!feof($fp)) {
$line=fgets($fp,120);
list($luser,$passwd,$junk) = explode(":",$line);