summaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-12 18:18:00 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-12 18:18:00 +0000
commita417ea08b658963a7d161e00355678fa5236bf1d (patch)
treefb4c33e9b47858aad3eb75ce38b08e008683cbee /src/plugins/regexp.c
parent55abc1e4fd53a5eb9bfcb89661ba2ae4308deb5a (diff)
downloadrspamd-a417ea08b658963a7d161e00355678fa5236bf1d.tar.gz
rspamd-a417ea08b658963a7d161e00355678fa5236bf1d.zip
Choose raw regexp for raw headers.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index ea0dc8781..76a0af804 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -513,9 +513,11 @@ process_regexp (struct rspamd_regexp *re,
re->header, rh->decoded);
if (re->type == REGEXP_RAW_HEADER) {
in = rh->value;
+ regexp = re->raw_regexp;
}
else {
in = rh->decoded;
+ regexp = re->regexp;
}
/* Try to match regexp */
if (!re->is_raw) {
@@ -526,8 +528,8 @@ process_regexp (struct rspamd_regexp *re,
}
}
if (in &&
- g_regex_match_full (re->regexp, in, -1, 0, 0, NULL,
- &err) == TRUE) {
+ g_regex_match_full (regexp, in, -1, 0, 0, NULL,
+ &err) == TRUE) {
if (G_UNLIKELY (re->is_test)) {
msg_info (
"process test regexp %s for header %s with value '%s' returned TRUE",