Skip to content
Snippets Groups Projects
Unverified Commit 3c9a1a3c authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Fix mistake

parent 7281342d
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,7 @@ class SimpleSAML_Auth_LDAP ...@@ -107,7 +107,7 @@ class SimpleSAML_Auth_LDAP
} }
// Enable TLS, if needed // Enable TLS, if needed
if (stripos($hostname, "ldaps:") === false and $enable_tls) { if (stripos($hostname, "ldaps:") === false && $enable_tls) {
if (!@ldap_start_tls($this->ldap)) { if (!@ldap_start_tls($this->ldap)) {
throw $this->makeException('Library - LDAP __construct(): Unable to force TLS', ERR_INTERNAL); throw $this->makeException('Library - LDAP __construct(): Unable to force TLS', ERR_INTERNAL);
} }
...@@ -427,8 +427,6 @@ class SimpleSAML_Auth_LDAP ...@@ -427,8 +427,6 @@ class SimpleSAML_Auth_LDAP
*/ */
public function bind($dn, $password, array $sasl_args = null) public function bind($dn, $password, array $sasl_args = null)
{ {
$authz_id = null;
if ($sasl_args != null) { if ($sasl_args != null) {
if (!function_exists('ldap_sasl_bind')) { if (!function_exists('ldap_sasl_bind')) {
$ex_msg = 'Library - missing SASL support'; $ex_msg = 'Library - missing SASL support';
...@@ -736,6 +734,7 @@ class SimpleSAML_Auth_LDAP ...@@ -736,6 +734,7 @@ class SimpleSAML_Auth_LDAP
*/ */
public function whoami($searchBase, $searchAttributes) public function whoami($searchBase, $searchAttributes)
{ {
$authz_id = '';
if (function_exists('ldap_exop_whoami')) { if (function_exists('ldap_exop_whoami')) {
if (version_compare(phpversion(), '7', '<')) { if (version_compare(phpversion(), '7', '<')) {
if (ldap_exop_whoami($this->ldap, $authz_id) !== true) { if (ldap_exop_whoami($this->ldap, $authz_id) !== true) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment