SSL and Alternate Ports
-
It’s actually quite easy to support alternate LDAP ports with SSL enabled, even with PHP working the way it does. Just change this code:
if (strstr($dc, ':')) list($dc, $port) = explode(':', $dc); switch($enableSsl){ case 1: $connection = ldap_connect($protocol.$dc); break; case 2: case 0: default: if(isset($port)){ $connection = ldap_connect($dc,$port); } else { $connection = ldap_connect($dc); } break; }
To this:
if (strstr($dc, ':')) list($dc, $port) = explode(':', $dc); switch($enableSsl){ case 1: if(isset($port)){ $connection = ldap_connect($protocol.$dc.':'.$port); } else { $connection = ldap_connect($protocol.$dc); } break; case 2: case 0: default: if(isset($port)){ $connection = ldap_connect($dc,$port); } else { $connection = ldap_connect($dc); } break; }
I make this modification to this plugin every time I download an update to it. It works quite well (our LDAPS port is 10636).
Maybe consider including this modification into the official source (and removing the note later on about alternate ports not working)?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘SSL and Alternate Ports’ is closed to new replies.