A free open source IT asset/license management system
Authentication/LDAP - Fixed [FD-56031] - throw Exception if STARTTLS fails
Brady Wetherington91ea06904fd5
diff --git a/app/Models/Ldap.php b/app/Models/Ldap.phpindex 36e053854d..4078dbe806 100644--- a/app/Models/Ldap.php+++ b/app/Models/Ldap.php@@ -97,7 +97,9 @@ class Ldap extends Modelldap_set_option($connection, LDAP_OPT_NETWORK_TIMEOUT, 20);if ($ldap_use_tls == '1') {- ldap_start_tls($connection);+ if (!ldap_start_tls($connection)) {+ throw new Exception('STARTTLS Failed.');+ }}return $connection;