diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-29 09:47:52 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-29 09:47:52 +0000 |
commit | 39814844b54aa2dfae7876e8fa01df1aeb1f4d2e (patch) | |
tree | 999615e01424f4d720f812cb9ba6c098d8c6034d /src/rspamadm | |
parent | 7b71ab56637b83470fc0bbcfab9f96422dc83c40 (diff) | |
download | rspamd-39814844b54aa2dfae7876e8fa01df1aeb1f4d2e.tar.gz rspamd-39814844b54aa2dfae7876e8fa01df1aeb1f4d2e.zip |
Use caseless search for keywords
Diffstat (limited to 'src/rspamadm')
-rw-r--r-- | src/rspamadm/confighelp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rspamadm/confighelp.c b/src/rspamadm/confighelp.c index d94d2ff91..462d6ff50 100644 --- a/src/rspamadm/confighelp.c +++ b/src/rspamadm/confighelp.c @@ -127,8 +127,10 @@ rspamadm_confighelp_search_word_step (const ucl_object_t *obj, if (cur->keylen > 0) { rspamd_printf_gstring (path, ".%*s", (int) cur->keylen, cur->key); - if (rspamd_substring_search (cur->key, cur->keylen, str, len) != - -1) { + if (rspamd_substring_search_caseless (cur->key, + cur->keylen, + str, + len) != -1) { ucl_object_insert_key (res, ucl_object_ref (cur), path->str, path->len, true); goto fin; @@ -139,7 +141,7 @@ rspamadm_confighelp_search_word_step (const ucl_object_t *obj, elt = ucl_object_find_key (cur, "data"); if (elt != NULL && ucl_object_type (elt) == UCL_STRING) { - if (rspamd_substring_search (elt->value.sv, + if (rspamd_substring_search_caseless (elt->value.sv, elt->len, str, len) != -1) { |