Skip to content

Commit

Permalink
Query attribute parsing problem
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Sep 22, 2022
1 parent 9551338 commit 2256292
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/query/ldapparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ valueloop:
return nil, nil, fmt.Errorf("No attributes matched pattern '%v'", attributename)
}
}
} else if attributename[0] == '_' {
} else {
// Magic attributes, uuuuuh ....
switch attributename {
case "_id":
Expand Down Expand Up @@ -247,15 +247,15 @@ valueloop:
direction = engine.In
}
return s, pwnquery{direction, edge, target}, nil
default:
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 2256292

Please sign in to comment.