cvs: docweb /include lib_auth.inc.php

From: Date: Sun, 13 Feb 2005 09:21:22 +0000
Subject: cvs: docweb /include lib_auth.inc.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-609@lists.php.net to get a copy of this message
jacques Sun Feb 13 04:21:22 2005 EDT Modified files: /docweb/include lib_auth.inc.php Log: Forgot to commit this last nite. http://cvs.php.net/diff.php/docweb/include/lib_auth.inc.php?r1=1.2&r2=1.3&ty=u Index: docweb/include/lib_auth.inc.php diff -u docweb/include/lib_auth.inc.php:1.2 docweb/include/lib_auth.inc.php:1.3 --- docweb/include/lib_auth.inc.php:1.2 Sat Feb 12 19:15:57 2005 +++ docweb/include/lib_auth.inc.php Sun Feb 13 04:21:22 2005 @@ -16,7 +16,7 @@ * | Authors: Jacques Marneweck <jacques@php.net> | * +----------------------------------------------------------------------+ * - * $Id: lib_auth.inc.php,v 1.2 2005/02/13 00:15:57 jacques Exp $ + * $Id: lib_auth.inc.php,v 1.3 2005/02/13 09:21:22 jacques Exp $ */ require_once 'cvs-auth.inc'; @@ -33,6 +33,19 @@ Header ("Location: http://doc.php.net/login.php"); exit; } +} elseif (isset($_POST['username']) && isset($_POST['passwd'])) { + if (!$_POST['username'] || !$_POST['passwd'] || !verify_password($_POST['username'], stripslashes($_POST['passwd']))) { + Header ("Location: http://doc.php.net/login.php"); + exit; + } + + setcookie( + "MAGIC_COOKIE", + base64_encode("{$_POST['username']}:{$_POST['passwd']}"), + time()+3600*24*12, + '/', + '.php.net' + ); } else { Header ("Location: http://doc.php.net/login.php"); exit;

« previous php.doc.web (#609) next »