Branch 'roundcubemail-plugins-kolab-3.1' - plugins/kolab_delegation

Aleksander Machniak machniak at kolabsys.com
Mon Apr 14 18:26:22 CEST 2014


 plugins/kolab_delegation/kolab_delegation_engine.php |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit ff592dec4c0a76467dd90ea16054b8388a329a1a
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Mon Apr 14 18:13:51 2014 +0200

    Fix bug where user could delegate himself (Bug #2981)

diff --git a/plugins/kolab_delegation/kolab_delegation_engine.php b/plugins/kolab_delegation/kolab_delegation_engine.php
index ef869f2..ad96831 100644
--- a/plugins/kolab_delegation/kolab_delegation_engine.php
+++ b/plugins/kolab_delegation/kolab_delegation_engine.php
@@ -427,6 +427,11 @@ class kolab_delegation_engine
         $result = $ldap->search($fields, $search, $mode, (array)$this->ldap_login_field, $max);
 
         foreach ($result as $record) {
+            // skip self
+            if ($record['dn'] == $_SESSION['kolab_dn']) {
+                continue;
+            }
+
             $user = $this->parse_ldap_record($record);
 
             if ($user['name']) {




More information about the commits mailing list