diff options
author | Gunnar Wrobel <wrobel@pardus.de> | 2010-02-21 10:04:49 (GMT) |
---|---|---|
committer | Gunnar Wrobel <wrobel@pardus.de> | 2010-02-21 10:04:49 (GMT) |
commit | 6b0d7f72d5676c1c2a721826b0f6e6199b00cc05 (patch) | |
tree | a7ee46abf331346ea5c6b24a366a622cf90a0e09 /lib | |
parent | 474486a544b779462ddf17c517569b3ae048f45b (diff) | |
download | kolab-webadmin-6b0d7f72d5676c1c2a721826b0f6e6199b00cc05.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/KolabAdmin/Ldap.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/KolabAdmin/Ldap.php b/lib/KolabAdmin/Ldap.php index cf4213f..5adf608 100644 --- a/lib/KolabAdmin/Ldap.php +++ b/lib/KolabAdmin/Ldap.php @@ -406,8 +406,8 @@ class KolabLDAP { $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++; } |