diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-20 20:44:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-20 20:45:22 +0000 |
commit | a45141c003e065341474de0ec0b4310b2f4437c8 (patch) | |
tree | 2e9851e15290df805793cf6b51d0a0ae0753c195 /src/lua/lua_regexp.c | |
parent | dc506fc54b60f4bcc7390447a0d80bfd6f799e54 (diff) | |
download | rspamd-a45141c003e065341474de0ec0b4310b2f4437c8.tar.gz rspamd-a45141c003e065341474de0ec0b4310b2f4437c8.zip |
[Fix] Properly escape utf8 regexps in hyperscan mode
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r-- | src/lua/lua_regexp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index 584f7d8c1..4e233448b 100644 --- a/src/lua/lua_regexp.c +++ b/src/lua/lua_regexp.c @@ -191,7 +191,8 @@ lua_regexp_import_glob (lua_State *L) } if (string) { - escaped = rspamd_str_regexp_escape (string, pat_len, NULL, TRUE); + escaped = rspamd_str_regexp_escape (string, pat_len, NULL, + RSPAMD_REGEXP_ESCAPE_GLOB|RSPAMD_REGEXP_ESCAPE_UTF); re = rspamd_regexp_new (escaped, flags_str, &err); @@ -249,7 +250,8 @@ lua_regexp_import_plain (lua_State *L) } if (string) { - escaped = rspamd_str_regexp_escape (string, pat_len, NULL, FALSE); + escaped = rspamd_str_regexp_escape (string, pat_len, NULL, + RSPAMD_REGEXP_ESCAPE_ASCII); re = rspamd_regexp_new (escaped, flags_str, &err); |