commit e879458: [Minor] Imply LEFTMOST flag on regexps with conditions
Vsevolod Stakhov
vsevolod at rspamd.com
Mon Sep 18 15:07:04 UTC 2023
Author: Vsevolod Stakhov
Date: 2023-09-18 15:55:23 +0100
URL: https://github.com/rspamd/rspamd/commit/e879458ea89ce76226c12078d05632f67bc657fe (HEAD -> master)
[Minor] Imply LEFTMOST flag on regexps with conditions
---
src/libmime/mime_expressions.c | 3 +++
1 file changed, 3 insertions(+)
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 */
More information about the Commits
mailing list