mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 23:54:08 +01:00
Merge pull request #674 from AnDann/LdapAnonym
* [MOD] Make anonymous bind to LDAP possible
This commit is contained in:
@@ -120,7 +120,7 @@ abstract class LdapBase implements LdapInterface, AuthInterface
|
||||
{
|
||||
$this->LogMessage->setAction(__FUNCTION__);
|
||||
|
||||
if (!$this->searchBase || !$this->server || !$this->bindDn || !$this->bindPass) {
|
||||
if (!$this->searchBase || !$this->server) {
|
||||
$this->LogMessage->addDescription(__('Los parámetros de LDAP no están configurados', false));
|
||||
$this->writeLog();
|
||||
|
||||
@@ -459,7 +459,7 @@ abstract class LdapBase implements LdapInterface, AuthInterface
|
||||
$this->bindPass = Config::getConfig()->getLdapBindPass();
|
||||
$this->group = Config::getConfig()->getLdapGroup();
|
||||
|
||||
if (!$this->searchBase || !$this->server || !$this->bindDn || !$this->bindPass) {
|
||||
if (!$this->searchBase || !$this->server) {
|
||||
$this->LogMessage->setAction(__FUNCTION__);
|
||||
$this->LogMessage->addDescription(__('Los parámetros de LDAP no están configurados', false));
|
||||
$this->writeLog();
|
||||
@@ -705,4 +705,4 @@ abstract class LdapBase implements LdapInterface, AuthInterface
|
||||
];
|
||||
return preg_replace($chars, '\\\$1', $dn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class ChecksController implements ItemControllerInterface
|
||||
$ldapBindUser = Request::analyze('ldap_binduser');
|
||||
$ldapBindPass = Request::analyzeEncrypted('ldap_bindpass');
|
||||
|
||||
if (!$ldapServer || !$ldapBase || !$ldapBindUser || !$ldapBindPass) {
|
||||
if (!$ldapServer || !$ldapBase) {
|
||||
$this->JsonResponse->setDescription(__('Los parámetros de LDAP no están configurados', false));
|
||||
return;
|
||||
}
|
||||
@@ -142,4 +142,4 @@ class ChecksController implements ItemControllerInterface
|
||||
$this->JsonResponse->addMessage(__('Revise el registro de eventos para más detalles', false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ class ConfigActionController implements ItemControllerInterface
|
||||
$ldapBindPass = Request::analyzeEncrypted('ldap_bindpass');
|
||||
|
||||
// Valores para la configuración de LDAP
|
||||
if ($ldapEnabled && (!$ldapServer || !$ldapBase || !$ldapBindUser)) {
|
||||
if ($ldapEnabled && (!$ldapServer || !$ldapBase)) {
|
||||
$this->JsonResponse->setDescription(__('Faltan parámetros de LDAP'));
|
||||
return;
|
||||
}
|
||||
@@ -743,4 +743,4 @@ class ConfigActionController implements ItemControllerInterface
|
||||
$this->JsonResponse->setDescription(__('Proceso de backup finalizado', false));
|
||||
$this->JsonResponse->setStatus(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user