Skip to content

Commit 32c0baa

Browse files
committed
QueryParser corner case panic fix
1 parent 8266894 commit 32c0baa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/ldapquery/queryparser.go

+4
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ valueloop:
218218

219219
valuenum, numok := strconv.ParseInt(value, 10, 64)
220220

221+
if len(attributename) == 0 {
222+
return nil, nil, errors.New("Empty attribute name detected")
223+
}
224+
221225
if attributename[0] == '_' {
222226
// Magic attributes, uuuuuh ....
223227
switch attributename {

0 commit comments

Comments
 (0)