Skip to content

Commit e290f64

Browse files
author
Fabian Strachanski
committed
fix(ldap): comments can be multiline too.
1 parent 18072ee commit e290f64

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)