fix ldap ad authentication filter query mechanism (#7441)

This commit is contained in:
Istvan Basa 2021-04-21 06:25:45 +02:00 committed by GitHub
parent 83200d3cbd
commit b037d0efdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,8 +93,12 @@ class Ldap extends Model
\Log::debug('Attempting to login using distinguished name:'.$userDn); \Log::debug('Attempting to login using distinguished name:'.$userDn);
$filterQuery = $settings->ldap_auth_filter_query . $username; $filterQuery = $settings->ldap_auth_filter_query . $username;
$filter = Setting::getSettings()->ldap_filter;
$filterQuery = "({$filter}({$filterQuery}))";
\Log::debug('Filter query: '.$filterQuery);
if (!$ldapbind = @ldap_bind($connection, $userDn, $password)) { if (!$ldapbind = @ldap_bind($connection, $userDn, $password)) {