From: Vsevolod Stakhov Date: Wed, 12 Nov 2014 18:18:00 +0000 (+0000) Subject: Choose raw regexp for raw headers. X-Git-Tag: 0.7.5~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a417ea08b658963a7d161e00355678fa5236bf1d;p=thirdparty%2Frspamd.git Choose raw regexp for raw headers. --- diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index ea0dc87816..76a0af8040 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",