Connot logon on version 2.0a caused by error in getConf() not looking for the good parameter ('Port')

Jump to: navigation, search

I upgraded my version of LDAPAuthentication, and couldn't log on my MediaWiki anymore. After activating the debug logs, I noticed that the connection string wasn't quite correct:

:2011-12-26 13:34:05  kbwiki: 2.0a Entering Connect
:2011-12-26 13:34:05  kbwiki: 2.0a Using TLS or not using encryption.
:2011-12-26 13:34:05  kbwiki: 2.0a Using servers:  ldap://myserver.foobar.com:
:2011-12-26 13:34:05  kbwiki: 2.0a Failed to connect

As you can see, there is a ':', but no port number. When Looking at the source, the line that builds the connection string (line 555):

$servers = $servers . " " . $serverpre . $tok . ":" . $this->getConf( 'LDAPPort' );

Looks for a variable named 'LDAPPort', but in the getConf function, it looks for a variable named 'Port' (line 183). I think this is the mistake.

To correct it, just change that line 183:

case 'Port':

with:

case 'LDAPPort':

And everything comes back to normal!

Luc Stepniewski13:52, 26 December 2011
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox