00786: Bug in authuser.php about LDAP

Summary: Bug in authuser.php about LDAP
Created: 2006-08-18 10:45
Status: Closed - fixed in 2.1.14
Category: Bug
From: gslin?
Assigned:
Priority: 1
Version: 2.1.13
OS: FreeBSD 6.0/Apache 2.0/PHP 5.1.4

Description: This bug will happen in using LDAPS, and this is patch:

--- authuser.php        Fri Aug 18 21:57:52 2006
+++ /usr/local/www/pmwiki/scripts/authuser.php  Fri Aug 18 21:56:05 2006
@@ -109,7 +109,7 @@
   foreach ((array)$pwlist as $ldap) {
     if (!preg_match('!(ldaps?://([^/]+))?/(.+)$!', $ldap, $match))
       continue;
-    list($z, $server, $path) = $match;
+    list($z, $server, $x, $path) = $match;
     list($basedn, $attr, $sub) = explode('?', $path);
     if (!$attr) $attr = 'uid';
     if (!$sub) $sub = 'one';