[MM-24526] Filter * characters from the search terms in DB (#14884)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7f64199a37
Коммит
fb453d578f
@@ -1750,11 +1750,9 @@ func (s *SqlPostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams
|
||||
pchan := make(chan store.StoreResult, len(paramsList))
|
||||
|
||||
for _, params := range paramsList {
|
||||
// Don't allow users to search for everything.
|
||||
if params.Terms == "*" {
|
||||
continue
|
||||
}
|
||||
|
||||
// remove any unquoted term that contains only non-alphanumeric chars
|
||||
// ex: abcd "**" && abc >> abcd "**" abc
|
||||
params.Terms = removeNonAlphaNumericUnquotedTerms(params.Terms, " ")
|
||||
params.IncludeDeletedChannels = includeDeletedChannels
|
||||
params.OrTerms = isOrSearch
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user