Fix if no userDB (#1774)

This commit is contained in:
Christophe Maudoux 2019-05-29 23:51:16 +02:00
parent 04603c0169
commit 432f2655bb

View File

@ -351,7 +351,12 @@ sub _userData {
$self->logger->debug('Identity not authorized');
return $req->error(PE_BADCREDENTIALS);
}
unless ( defined $req->sessionInfo->{uid} ) {
# Avoid error with SAML, OIDC, etc...
$self->logger->debug("\"$req->{user}\" NOT found in userDB");
return $req->error(PE_BADCREDENTIALS);
}
$self->logger->debug("Return \"$req->{user}\" sessionInfo");
return $req->{sessionInfo};
}