Skip to content

Commit 2fb2091

Browse files
authored
Merge pull request #938 from fastrde/fix_multiline_comments
fix(ldap): ldif comments can be multiline too.
2 parents e9033c4 + 0c003ac commit 2fb2091

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

providers/directory/ldif.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ func (l *Ldif) Parse(config *dynamic.Config, reader dynamic.Reader) error {
6363
}
6464
continue
6565
}
66-
if line[0] == '#' || line[0] == '-' {
67-
continue
68-
}
6966

7067
if isMultiLine(i + 1) {
7168
parsedLine += trim(line)
@@ -75,6 +72,10 @@ func (l *Ldif) Parse(config *dynamic.Config, reader dynamic.Reader) error {
7572
parsedLine = ""
7673
}
7774

75+
if line[0] == '#' || line[0] == '-' {
76+
continue
77+
}
78+
7879
kv := strings.SplitN(line, ":", 2)
7980
if len(kv) != 2 {
8081
return fmt.Errorf("invalid line %v: %s", i, line)

0 commit comments

Comments
 (0)