Fix bad call in LDAP (#1805)
This commit is contained in:
parent
862116245d
commit
aff7527580
|
@ -41,7 +41,18 @@ sub authenticate {
|
||||||
|
|
||||||
# Set the dn unless done before
|
# Set the dn unless done before
|
||||||
unless ( $req->data->{dn} ) {
|
unless ( $req->data->{dn} ) {
|
||||||
if ( my $tmp = $self->getUser($req) ) {
|
my $class = ref $self;
|
||||||
|
$class =~ s/::Auth::/::UserDB::/;
|
||||||
|
$class->logger->warn(
|
||||||
|
'Auth::LDAP used without UserDB::LDAP, LLNG may fail');
|
||||||
|
my $tmp = eval { $self->p->loadedModules->{$class}->getUser($req) };
|
||||||
|
if ($@) {
|
||||||
|
$self->logger->error(
|
||||||
|
"Unable to authenticate using Auth::LDAP without having a UserDB::LDAP search: $@"
|
||||||
|
);
|
||||||
|
return PE_ERROR;
|
||||||
|
}
|
||||||
|
if ($tmp) {
|
||||||
$self->setSecurity($req);
|
$self->setSecurity($req);
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user