[Pkg-mediawiki-devel] Bug#472286: mediawiki-extensions: When adding users to LDAP, incorrect dn is generated

Jamie Thompson debian-bugs at jamie-thompson.co.uk
Sun Mar 23 05:49:51 UTC 2008


Package: mediawiki-extensions
Version: 1.3
Severity: normal


In LdapAuthentication.php at 801 we have:
if ( isset( $wgLDAPWriteLocation[$_SESSION['wsDomain']] ) ) {
	$this->printDebug( "wgLDAPWriteLocation is set, using that", NONSENSITIVE );
	$userdn = $wgLDAPSearchAttributes[$_SESSION['wsDomain']] . "=" .
		$username . $wgLDAPWriteLocation[$_SESSION['wsDomain']];
} else {

This will generate an invlaid DN every time as it concatenates "uid=$username" to the write location dn withotu a seperator. I made it work as expected by changing it to this:
if ( isset( $wgLDAPWriteLocation[$_SESSION['wsDomain']] ) ) {
	$this->printDebug( "wgLDAPWriteLocation is set, using that", NONSENSITIVE );
	$userdn = $wgLDAPSearchAttributes[$_SESSION['wsDomain']] . "=" .
		$username . ',' . $wgLDAPWriteLocation[$_SESSION['wsDomain']];
} else {

The LDAP entry then gets a valid DN.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages mediawiki-extensions depends on:
ii  mediawiki                     1:1.11.2-2 website engine for collaborative w

Versions of packages mediawiki-extensions recommends:
ii  php-geshi                     1.0.7.20-1 Generic Syntax Highlighter
ii  php5-ldap                     5.2.5-3    LDAP module for php5
ii  python                        2.4.4-6    An interactive high-level object-o
ii  python-imaging                1.1.6-1    Python Imaging Library

-- no debconf information





More information about the Pkg-mediawiki-devel mailing list