Skip to content

Commit

Permalink
Fix error when searching for just a literal colon
Browse files Browse the repository at this point in the history
  • Loading branch information
ddworken committed Nov 18, 2024
1 parent 9a06b07 commit f64e466
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/lib/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,9 @@ func parseNonAtomizedToken(token string) (string, any, any, any, error) {

func parseAtomizedToken(ctx context.Context, token string) (string, any, any, error) {
splitToken := splitEscaped(token, ':', 2)
if len(splitToken) != 2 {
return "", nil, nil, fmt.Errorf("search query contains malformed search atom '%s'", token)
}
field := unescape(splitToken[0])
val := unescape(splitToken[1])
switch field {
Expand Down

0 comments on commit f64e466

Please sign in to comment.