]> source.dussan.org Git - rspamd.git/commitdiff
Choose raw regexp for raw headers.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Nov 2014 18:18:00 +0000 (18:18 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Nov 2014 18:18:00 +0000 (18:18 +0000)
src/plugins/regexp.c

index ea0dc878162d012e5d9ab5669f18ae2854304669..76a0af8040bd2e8721130d1ed1004e89eb466fe4 100644 (file)
@@ -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",