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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
757dca2b
Commit
757dca2b
authored
Mar 06, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escape wildcards when searching LDAP by username.
parent
e916f1c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/ldap/authentication.rb
lib/gitlab/ldap/authentication.rb
+1
-1
lib/gitlab/ldap/person.rb
lib/gitlab/ldap/person.rb
+2
-0
No files found.
CHANGELOG
View file @
757dca2b
...
...
@@ -20,6 +20,7 @@ v 7.9.0 (unreleased)
- Add brakeman (security scanner for Ruby on Rails)
- Slack username and channel options
- Add grouped milestones from all projects to dashboard.
- Escape wildcards when searching LDAP by username.
v 7.8.1
- Fix run of custom post receive hooks
...
...
lib/gitlab/ldap/authentication.rb
View file @
757dca2b
...
...
@@ -50,7 +50,7 @@ module Gitlab
end
def
user_filter
(
login
)
filter
=
Net
::
LDAP
::
Filter
.
eq
(
config
.
uid
,
login
)
filter
=
Net
::
LDAP
::
Filter
.
eq
uals
(
config
.
uid
,
login
)
# Apply LDAP user filter if present
if
config
.
user_filter
.
present?
...
...
lib/gitlab/ldap/person.rb
View file @
757dca2b
...
...
@@ -9,10 +9,12 @@ module Gitlab
attr_accessor
:entry
,
:provider
def
self
.
find_by_uid
(
uid
,
adapter
)
uid
=
Net
::
LDAP
::
Filter
.
escape
(
uid
)
adapter
.
user
(
adapter
.
config
.
uid
,
uid
)
end
def
self
.
find_by_dn
(
dn
,
adapter
)
dn
=
Net
::
LDAP
::
Filter
.
escape
(
dn
)
adapter
.
user
(
'dn'
,
dn
)
end
...
...
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