summaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
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",