From e1522353dd7c1199bedc3f981994911e1ed7449b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Mon, 29 Jul 2019 09:32:22 +0000
Subject: [PATCH] Merge branch 'stricter-ldap-error-check' into '1.4-dev'

:ambulance: fix(ldap) Use a stricter error check in ldap::success()

See merge request fusiondirectory/fd!648

(cherry picked from commit 29ca9876df28e45bb8f4f8960f3760c336936dfc)

23936352 :ambulance: fix(ldap) Use a stricter error check in ldap::success()
---
 include/class_ldap.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index eb0ebb989..c6cd7497d 100644
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
@@ -881,7 +881,7 @@ class LDAP
    */
   function success()
   {
-    return preg_match('/Success/i', $this->error);
+    return (trim($this->error) === 'Success');
   }
 
   /*!
-- 
GitLab