diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-18 15:55:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-18 15:55:23 +0100 |
commit | e879458ea89ce76226c12078d05632f67bc657fe (patch) | |
tree | b6ec87583db7bc6fdf7c172e171693aff24a5ba1 | |
parent | b59249576fb9d87008dd016cc5cfa3e06e69585e (diff) | |
download | rspamd-e879458ea89ce76226c12078d05632f67bc657fe.tar.gz rspamd-e879458ea89ce76226c12078d05632f67bc657fe.zip |
[Minor] Imply LEFTMOST flag on regexps with conditions
-rw-r--r-- | src/libmime/mime_expressions.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index 20f2c754e..e51539ed0 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -854,6 +854,9 @@ set: if (lua_cbref != -1) { msg_info_config("added condition for regexp %s", mime_atom->str); + /* Add SOM_LEFTMOST_FLAG implicitly */ + rspamd_regexp_set_flags(mime_atom->d.re->regexp, rspamd_regexp_get_flags(mime_atom->d.re->regexp) | + RSPAMD_REGEXP_FLAG_LEFTMOST); } /* Register new item in the cache */ |