cvs: docweb /include lib_auth.inc.php

From: Date: Fri, 29 Jul 2005 21:02:54 +0000
Subject: cvs: docweb /include lib_auth.inc.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-707@lists.php.net to get a copy of this message
jacques Fri Jul 29 17:02:54 2005 EDT Modified files: /docweb/include lib_auth.inc.php Log: Check if we have a magic cookie prior to getting the username and passwords, and also make the password work for users who have a : in their password. http://cvs.php.net/diff.php/docweb/include/lib_auth.inc.php?r1=1.7&r2=1.8&ty=u Index: docweb/include/lib_auth.inc.php diff -u docweb/include/lib_auth.inc.php:1.7 docweb/include/lib_auth.inc.php:1.8 --- docweb/include/lib_auth.inc.php:1.7 Fri Jul 29 15:31:12 2005 +++ docweb/include/lib_auth.inc.php Fri Jul 29 17:02:54 2005 @@ -17,7 +17,7 @@ * | Nuno Lopes <nlopess@php.net> | * +----------------------------------------------------------------------+ * - * $Id: lib_auth.inc.php,v 1.7 2005/07/29 19:31:12 nlopess Exp $ + * $Id: lib_auth.inc.php,v 1.8 2005/07/29 21:02:54 jacques Exp $ */ require_once 'cvs-auth.inc'; @@ -40,8 +40,9 @@ $user = $password = false; // make the username & password global -list($user, $password) = explode(':', base64_decode(@$_COOKIE['MAGIC_COOKIE'])); - +if (isset($_COOKIE['MAGIC_COOKIE'])) { + list($user, $password) = explode(':', base64_decode(@$_COOKIE['MAGIC_COOKIE']), 2); +} /** * Credential checking of the $_COOKIE['MAGIC_COOKIE']

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