Commit e9c1b964 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout test si le login usurpé existe bien dans l'annuaire.

parent 3a7aa2c4
......@@ -84,6 +84,13 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even
$result = $this->getLdapAuthAdapter()->setUsername($username)->setPassword($credential)->authenticate();
$failure = !$result->isValid();
// verif existence du login usurpé
if ($usernameUsurpe) {
if (!$this->getLdapAuthAdapter()->getLdap()->searchEntries("(supannAliasLogin=$usernameUsurpe)")) {
$usernameUsurpe = null;
}
}
// Failure!
if ($failure) {
$e->setCode(AuthenticationResult::FAILURE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment