From 9d96ba47499242bc5c85dd82d1f0b2f910b65333 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 15 Oct 2008 09:49:49 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSldap=20:=20Protection=20contre=20la=20sup?= =?UTF-8?q?pression=20d'attribut=20n'existant=20pas.=20Cela=20=09causais?= =?UTF-8?q?=20selon=20les=20annuaires/serveurs=20web=20des=20plantages=20s?= =?UTF-8?q?=C3=A9rieux.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/includes/class/class.LSldap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trunk/includes/class/class.LSldap.php b/trunk/includes/class/class.LSldap.php index 6e43d425..8fe8fe0b 100644 --- a/trunk/includes/class/class.LSldap.php +++ b/trunk/includes/class/class.LSldap.php @@ -305,6 +305,10 @@ class LSldap { else { if (!empty($dropAttr)) { foreach($dropAttr as $attr) { + if(Net_LDAP2::isError($entry -> getValue($attr))) { + // Attribut n'existe pas dans l'annuaire + continue; + } // Méthode buggé : suppression impossible de certain attribut // exemple : jpegPhoto // $entry -> delete($attr);