Skip to content

Commit

Permalink
QueryParser corner case panic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Feb 22, 2022
1 parent 8266894 commit 32c0baa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/ldapquery/queryparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ valueloop:

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

if len(attributename) == 0 {
return nil, nil, errors.New("Empty attribute name detected")
}

if attributename[0] == '_' {
// Magic attributes, uuuuuh ....
switch attributename {
Expand Down

0 comments on commit 32c0baa

Please sign in to comment.