mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
Merge branch 'bugfix/ldap-connection-fail-when-encryption-not-possible-9608'
fixes #9608
This commit is contained in:
commit
930303dfb2
@ -160,7 +160,7 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $encryptionSuccess;
|
protected $encrypted = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
@ -295,11 +295,11 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
*/
|
*/
|
||||||
public function isEncrypted()
|
public function isEncrypted()
|
||||||
{
|
{
|
||||||
if ($this->encryptionSuccess === null) {
|
if ($this->encrypted === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->encryptionSuccess;
|
return $this->encrypted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -340,12 +340,6 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->bound = true;
|
$this->bound = true;
|
||||||
|
|
||||||
if ($this->encryptionSuccess === false && $this->getCapabilities()->hasStartTls()) {
|
|
||||||
// Alert the user about the unencrypted connection if there is really an error. If the server
|
|
||||||
// does not support it, don't do anything as authentication is completely broken otherwise.
|
|
||||||
throw new LdapException('LDAP STARTTLS failed. An error occured. Please see the log for more details');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user