Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2bfa02bb
Commit
2bfa02bb
authored
Mar 28, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for errors in Adapter#dn_matches_filter?
parent
401cac62
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lib/gitlab/ldap/adapter.rb
lib/gitlab/ldap/adapter.rb
+6
-1
No files found.
lib/gitlab/ldap/adapter.rb
View file @
2bfa02bb
...
...
@@ -107,7 +107,12 @@ module Gitlab
end
def
dn_matches_filter?
(
dn
,
filter
)
ldap
.
search
(
base:
dn
,
filter:
filter
,
attributes:
%w{dn}
).
any?
results
=
ldap
.
search
(
base:
dn
,
filter:
filter
,
attributes:
%w{dn}
)
if
results
.
nil?
false
# Net::LDAP encountered an LDAP error
else
results
.
any?
end
end
private
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment