Skip to content

Commit

Permalink
Fixed bug for special synthetic attributes nuking non-synthetic attri…
Browse files Browse the repository at this point in the history
…butes starting with an underscore
  • Loading branch information
lkarlslund committed Sep 16, 2022
1 parent 600eccb commit 3defec2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions modules/query/ldapparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,15 @@ valueloop:
}
}
return s, pwnquery{attributename == "_canpwn", edge, target}, nil
// default:
// return "", nil, fmt.Errorf("Unknown synthetic attribute %v", attributename)
}
} else {
attribute := engine.A(attributename)
if attribute == engine.NonExistingAttribute {
return nil, nil, fmt.Errorf("Unknown attribute %v", attributename)
}
attributes = []engine.Attribute{attribute}
}

attribute := engine.A(attributename)
if attribute == engine.NonExistingAttribute {
return nil, nil, fmt.Errorf("Unknown attribute %v", attributename)
}
attributes = []engine.Attribute{attribute}

attribute2 := engine.NonExistingAttribute
if attributename2 != "" {
attribute2 = engine.A(attributename2)
Expand Down

0 comments on commit 3defec2

Please sign in to comment.