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
3fde6f68
Commit
3fde6f68
authored
Sep 20, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trailing escaped space
parent
cb591f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
lib/gitlab/ldap/dn.rb
lib/gitlab/ldap/dn.rb
+11
-0
No files found.
lib/gitlab/ldap/dn.rb
View file @
3fde6f68
...
@@ -115,6 +115,7 @@ module Gitlab
...
@@ -115,6 +115,7 @@ module Gitlab
when
'0'
..
'9'
,
'a'
..
'f'
then
when
'0'
..
'9'
,
'a'
..
'f'
then
state
=
:value_normal_escape_hex
state
=
:value_normal_escape_hex
hex_buffer
=
char
hex_buffer
=
char
when
' '
then
state
=
:value_normal_escape_space
;
value
<<
char
else
state
=
:value_normal
;
value
<<
char
else
state
=
:value_normal
;
value
<<
char
end
end
when
:value_normal_escape_hex
then
when
:value_normal_escape_hex
then
...
@@ -124,6 +125,16 @@ module Gitlab
...
@@ -124,6 +125,16 @@ module Gitlab
value
<<
"
#{
hex_buffer
}#{
char
}
"
.
to_i
(
16
).
chr
value
<<
"
#{
hex_buffer
}#{
char
}
"
.
to_i
(
16
).
chr
else
raise
"DN badly formed"
else
raise
"DN badly formed"
end
end
when
:value_normal_escape_space
then
case
char
when
'\\'
then
state
=
:value_normal_escape
when
','
then
state
=
:key
yield
key
.
string
.
strip
,
value
.
string
# Don't strip trailing escaped space!
key
=
StringIO
.
new
value
=
StringIO
.
new
;
else
value
<<
char
end
when
:value_quoted
then
when
:value_quoted
then
case
char
case
char
when
'\\'
then
state
=
:value_quoted_escape
when
'\\'
then
state
=
:value_quoted_escape
...
...
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