mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
Fix that ldap auth validation does not send a BIND request
This commit is contained in:
parent
5b3d549e5c
commit
2c44fe34a7
@ -114,7 +114,13 @@ class LdapResourceForm extends Form
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$resource = ResourceFactory::createResource(new Zend_Config($form->getValues()));
|
$resource = ResourceFactory::createResource(new Zend_Config($form->getValues()));
|
||||||
$resource->connect();
|
if (false === $resource->testCredentials(
|
||||||
|
$form->getElement('bind_dn')->getValue(),
|
||||||
|
$form->getElement('bind_pw')->getValue()
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$form->addError(t('Connectivity validation failed, connection to the given resource not possible.'));
|
$form->addError(t('Connectivity validation failed, connection to the given resource not possible.'));
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user