cvs: phpweb / bugs.php

From: Date: Sat, 07 Jul 2001 23:28:09 +0000
Subject: cvs: phpweb / bugs.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-5314@lists.php.net to get a copy of this message
jimw Sat Jul 7 19:28:09 2001 EDT Modified files: /phpweb bugs.php Log: hey, i thought those functions seemed familiar. Index: phpweb/bugs.php diff -u phpweb/bugs.php:1.139 phpweb/bugs.php:1.140 --- phpweb/bugs.php:1.139 Sat Jul 7 17:33:13 2001 +++ phpweb/bugs.php Sat Jul 7 19:28:08 2001 @@ -1,6 +1,8 @@ <?php /* vim: set noet ts=4 sw=4: : */ require_once 'prepend.inc'; +require 'cvs-auth.inc'; + if (isset($save) && isset($pw)) { # non-developers don't have $user set setcookie("MAGIC_COOKIE",base64_encode("$user:$pw"),time()+3600*24*12,'/'); } @@ -244,7 +246,7 @@ $from = $email; } elseif ($modify == "developer") { - if (!valid_login($user,$pw)) { + if (!verify_password($user,$pw)) { echo "<h2 class=\"error\">The username or password you supplied was incorrect.</h2>\n"; } elseif (incoming_details_are_valid()) { @@ -573,33 +575,6 @@ if (!$use && $current) { echo "<option selected>$current</option>\n"; } -} - -function find_password($user) { - $fp=@fopen("/repository/CVSROOT/passwd","r"); - if (!$fp) { - return (""); - } - while(!feof($fp)) { - $line=fgets($fp,120); - list($luser,$passwd,$junk) = explode(":",$line); - if($user==$luser) { - fclose($fp); - return($passwd); - } - } - fclose($fp); - return(""); -} - -function valid_login($user,$pass) { - if($user!="cvsread") { - $psw=find_password($user); - if(strlen($psw)>0) { - return crypt($pass,substr($psw,0,2)) == $psw; - } - } - return false; } function get_old_comments ($bug_id) {

« previous php.mirrors (#5314) next »