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
Jérome Perrin
gitlab-ce
Commits
a0d7a22e
Commit
a0d7a22e
authored
Sep 20, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always downcase DNs
parent
91f2492a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
lib/gitlab/ldap/dn.rb
lib/gitlab/ldap/dn.rb
+12
-10
No files found.
lib/gitlab/ldap/dn.rb
View file @
a0d7a22e
...
...
@@ -37,10 +37,12 @@ module Gitlab
buffer
<<
"="
if
index
%
2
==
1
buffer
<<
","
if
index
%
2
==
0
&&
index
!=
0
arg
=
args
[
index
].
downcase
if
index
<
args
.
length
-
1
||
index
%
2
==
1
buffer
<<
self
.
class
.
escape
(
arg
s
[
index
]
)
buffer
<<
self
.
class
.
escape
(
arg
)
else
buffer
<<
arg
s
[
index
]
buffer
<<
arg
end
end
...
...
@@ -60,7 +62,7 @@ module Gitlab
case
state
when
:key
then
case
char
when
'a'
..
'z'
,
'A'
..
'Z'
then
when
'a'
..
'z'
then
state
=
:key_normal
key
<<
char
when
'0'
..
'9'
then
...
...
@@ -72,7 +74,7 @@ module Gitlab
when
:key_normal
then
case
char
when
'='
then
state
=
:value
when
'a'
..
'z'
,
'
A'
..
'Z'
,
'
0'
..
'9'
,
'-'
,
' '
then
key
<<
char
when
'a'
..
'z'
,
'0'
..
'9'
,
'-'
,
' '
then
key
<<
char
else
raise
"DN badly formed"
end
when
:key_oid
then
...
...
@@ -110,14 +112,14 @@ module Gitlab
end
when
:value_normal_escape
then
case
char
when
'0'
..
'9'
,
'a'
..
'f'
,
'A'
..
'F'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_normal_escape_hex
hex_buffer
=
char
else
state
=
:value_normal
;
value
<<
char
end
when
:value_normal_escape_hex
then
case
char
when
'0'
..
'9'
,
'a'
..
'f'
,
'A'
..
'F'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_normal
value
<<
"
#{
hex_buffer
}#{
char
}
"
.
to_i
(
16
).
chr
else
raise
"DN badly formed"
...
...
@@ -130,7 +132,7 @@ module Gitlab
end
when
:value_quoted_escape
then
case
char
when
'0'
..
'9'
,
'a'
..
'f'
,
'A'
..
'F'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_quoted_escape_hex
hex_buffer
=
char
else
...
...
@@ -139,14 +141,14 @@ module Gitlab
end
when
:value_quoted_escape_hex
then
case
char
when
'0'
..
'9'
,
'a'
..
'f'
,
'A'
..
'F'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_quoted
value
<<
"
#{
hex_buffer
}#{
char
}
"
.
to_i
(
16
).
chr
else
raise
"DN badly formed"
end
when
:value_hexstring
then
case
char
when
'0'
..
'9'
,
'a'
..
'f'
,
'A'
..
'F'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_hexstring_hex
value
<<
char
when
' '
then
state
=
:value_end
...
...
@@ -159,7 +161,7 @@ module Gitlab
end
when
:value_hexstring_hex
then
case
char
when
'0'
..
'9'
,
'a'
..
'f'
,
'A'
..
'F'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_hexstring
value
<<
char
else
raise
"DN badly formed"
...
...
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