r20306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20305‎ | r20306 | r20307 >
Date:00:38, 10 March 2007
Author:laner
Status:old
Tags:
Comment:
Changing connect method to fail if ldap_start_tls fails.
Modified paths:
  • /trunk/extensions/LdapAuthentication/LdapAuthentication.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php
@@ -163,7 +163,10 @@
164164 //TLS needs to be started after the connection is made
165165 if ( $encryptionType == "tls" ) {
166166 $this->printDebug("Using TLS",2);
167 - ldap_start_tls($ldapconn);
 167+ if ( !ldap_start_tls( $ldapconn ) ) {
 168+ $this->printDebug("Failed to start TLS.",2);
 169+ return;
 170+ }
168171 }
169172
170173 return $ldapconn;