"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/plugins/ldap/class/ldap.class.php" between
fogproject-1.5.8.tar.gz and fogproject-1.5.9.tar.gz

About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.

ldap.class.php  (fogproject-1.5.8):ldap.class.php  (fogproject-1.5.9)
skipping to change at line 145 skipping to change at line 145
{ {
$ldap = 'ldap'; $ldap = 'ldap';
$ports = array_map( $ports = array_map(
'trim', 'trim',
explode( explode(
',', ',',
self::getSetting('LDAP_PORTS') self::getSetting('LDAP_PORTS')
) )
); );
$port = $this->get('port'); $port = $this->get('port');
$address = $this->get('address'); $address = preg_replace('#^.*://#i', '', $this->get('address'));
if (!in_array($port, $ports)) { if (!in_array($port, $ports)) {
throw new Exception(_('Port is not valid ldap/ldaps port')); throw new Exception(_('Port is not valid ldap/ldaps port'));
} }
$sock = @pfsockopen( $sock = @pfsockopen(
$address, $address,
$port, $port,
$errno, $errno,
$errstr, $errstr,
$timeout $timeout
); );
if ($sock === false) { if ($sock === false) {
return false; return false;
} }
fclose($sock); fclose($sock);
return sprintf( return sprintf(
'%s%s://%s', '%s%s://%s',
$ldap, $ldap,
( (
$port == 636 ? in_array($port, [ 636, 686, 3269, 7636 ]) ?
's' : 's' :
'' ''
), ),
$address $address
); );
} }
/** /**
* Parses the DN * Parses the DN
* *
* @param string $dn the DN to parse * @param string $dn the DN to parse
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)