aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-11 15:43:30 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-11 15:43:30 +0000
commit3a04ba27ee630246cdba7bb61ba3f7b0a5dd9980 (patch)
tree7620a3446201cf87f9686b7b67835f76dca606a4 /src/plugins/regexp.c
parentdd5e66af883f47c9df98265369cc2d5fce0c6139 (diff)
downloadrspamd-3a04ba27ee630246cdba7bb61ba3f7b0a5dd9980.tar.gz
rspamd-3a04ba27ee630246cdba7bb61ba3f7b0a5dd9980.zip
Fix issue with raw regexp processing.
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 09725c7c7..b96fcca31 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -503,13 +503,14 @@ process_regexp (struct rspamd_regexp_element *re,
rh = cur->data;
debug_task ("found header \"%s\" with value \"%s\"",
re->header, rh->decoded);
+ regexp = re->regexp;
+
if (re->type == REGEXP_RAW_HEADER) {
in = rh->value;
raw = TRUE;
}
else {
in = rh->decoded;
- regexp = re->regexp;
/* Validate input */
if (!in || !g_utf8_validate (in, -1, NULL)) {
cur = g_list_next (cur);
@@ -572,14 +573,13 @@ process_regexp (struct rspamd_regexp_element *re,
cur = g_list_next (cur);
continue;
}
+
+ regexp = re->regexp;
+
/* Check raw flags */
if (part->is_raw) {
raw = TRUE;
}
- else {
- /* This time there is no need to validate anything as conversion succeed only for valid characters */
- regexp = re->regexp;
- }
/* Select data for regexp */
if (raw) {
ct = part->orig->data;