Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Escape regex from user input
Browse files Browse the repository at this point in the history
  • Loading branch information
connorkuehl committed Jul 30, 2023
1 parent c760b1e commit e3ff891
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autocompletions.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ func (ac *AutoCompletions) CollectionNames(serverID, input string) ([]string, er
// Just match as much as possible if there's no input.
if input == "" {
input = "."
} else {
input = regexp.QuoteMeta(input)
}
input = strings.ToLower(input)

Expand Down

0 comments on commit e3ff891

Please sign in to comment.