Skip to content

Commit

Permalink
[Minor] Imply LEFTMOST flag on regexps with conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Sep 18, 2023
1 parent b592495 commit e879458
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libmime/mime_expressions.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ rspamd_mime_expr_parse(const gchar *line, gsize len,

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 */
Expand Down

0 comments on commit e879458

Please sign in to comment.