gunnar: server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin Ldap.php, 1.2, 1.3

cvs at kolab.org cvs at kolab.org
Sun Feb 21 11:04:51 CET 2010


Author: gunnar

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin
In directory doto:/tmp/cvs-serv5627/kolab-webadmin/kolab-webadmin/lib/KolabAdmin

Modified Files:
	Ldap.php 
Log Message:
kolab/issue3499 (Kolab web admin does not use LDAP escaping)

Found the actual issue I tried to fix last time which was the broken midair collision check. Now it also makes sense why the function broke with the later fixing I did. Basically countMail() was not aware of any LDAP escaping when counting objects with an excluded DN. Should now be fixed and I added a test for that problem.

Index: Ldap.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin/Ldap.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Ldap.php	21 Feb 2010 09:00:49 -0000	1.2
+++ Ldap.php	21 Feb 2010 10:04:49 -0000	1.3
@@ -406,8 +406,8 @@
 	$entries = ldap_get_entries( $this->connection, $res );
 	if( $excludedn ) {
 	  for ( $i = 0; $i < count( $entries ); $i++ ) {
-		if( is_null( $entries[$i] ) ) continue;
-		if( $entries[$i]['dn'] == $excludedn ) continue;	   
+		if( !isset($entries[$i]) || is_null( $entries[$i] ) ) continue;
+		if( KolabLDAP::unescape_dn_value($entries[$i]['dn']) == KolabLDAP::unescape_dn_value($excludedn) ) continue;	   
 		debug("found ".$entries[$i]['dn'] );
 		$count++;
 	  } 





More information about the commits mailing list