Page MenuHomePhabricator

extension LdapAuthentication broken with php5.6
Closed, DuplicatePublic

Description

Upgrading to PHP5.6 broke authentication when using LdapAuthenication extension. There is a discussion about this on the extensions page, however I did not see a bug logged for this, so I thought someone (ie. me) should do it.

https://www.mediawiki.org/wiki/Topic:Sl9i17el9a1g9tv1

Here is a diff of the tiny change required to fix the problem.

--- extensions/LdapAuthentication/LdapAuthentication.php        2015-05-26 16:24:49.812626622 +1000
+++ extensions/LdapAuthentication/LdapAuthentication.php.new    2015-08-12 14:21:32.276420172 +1000
@@ -597,7 +597,7 @@
                        $servers = $servers . " " . $serverpre . $tok . ":" . $this->getConf( 'Port', $domain );
                        $tok = strtok( " " );
                }
-               $servers = rtrim( $servers );
+               $servers = trim( $servers );
 
                $this->printDebug( "Using servers: $servers", SENSITIVE );

Event Timeline

green_aussie raised the priority of this task from to Needs Triage.
green_aussie updated the task description. (Show Details)
green_aussie subscribed.

Thanks for taking a look at the code and sorry for the very belated reply!

This got fixed in T56968 hence closing as duplicate...