]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Match any newline character in regexps
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Dec 2015 13:40:37 +0000 (13:40 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Dec 2015 13:40:37 +0000 (13:40 +0000)
Issue: #438
Reported by: @moisseev

src/libutil/regexp.c

index 2bf21ca1e671fb34c52043b2f7c46dbfa6643598..2ddfa694d07ad76c6afae2374725fa7f0641a50a 100644 (file)
@@ -179,6 +179,8 @@ rspamd_regexp_new (const gchar *pattern, const gchar *flags,
        }
 
        rspamd_flags |= RSPAMD_REGEXP_FLAG_RAW;
+
+       regexp_flags |= PCRE_NEWLINE_ANYCRLF;
        regexp_flags &= ~PCRE_UTF8;
 
        if (flags_str != NULL) {
@@ -389,6 +391,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len,
        }
 
        match_flags = PCRE_NEWLINE_ANYCRLF;
+
        if ((re->flags & RSPAMD_REGEXP_FLAG_RAW) || raw) {
                r = re->raw_re;
                ext = re->raw_extra;