cvs: docweb /include lib_auth.inc.php
[email protected] ("Jacques Marneweck")
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <cvsjacques1122670974@cvsserver> |
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 <[email protected]> |
* +----------------------------------------------------------------------+
*
- * $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']