Skip to content
Snippets Groups Projects
Commit 186e8ad9 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Merge pull request #5400 from lokedhs/master

When looking up a user by DN, use single scope
parents 5b091c76 bc8a875d
No related branches found
No related tags found
1 merge request!1Fix Links To Gitlab Cloud
Loading
@@ -78,7 +78,7 @@ module Gitlab
Loading
@@ -78,7 +78,7 @@ module Gitlab
# * when ldap account was deactivated by change of OU membership in 'dn' # * when ldap account was deactivated by change of OU membership in 'dn'
def blocked?(dn) def blocked?(dn)
ldap = OmniAuth::LDAP::Adaptor.new(ldap_conf) ldap = OmniAuth::LDAP::Adaptor.new(ldap_conf)
ldap.connection.search(base: dn, size: 1).blank? ldap.connection.search(base: dn, scope: Net::LDAP::SearchScope_BaseObject, size: 1).blank?
end end
   
private private
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment