diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-02 13:40:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-02 13:40:37 +0000 |
commit | 09c3e1b85633c1541555b1fdd74f814b2a0ff930 (patch) | |
tree | b97bedbf4e46169b45dc15fa9b89b2c93a87f6e8 /src/libutil/regexp.c | |
parent | 519fe05bd1eebeea5be8d7ba26e9d7d874559f82 (diff) | |
download | rspamd-09c3e1b85633c1541555b1fdd74f814b2a0ff930.tar.gz rspamd-09c3e1b85633c1541555b1fdd74f814b2a0ff930.zip |
Match any newline character in regexps
Issue: #438
Reported by: @moisseev
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r-- | src/libutil/regexp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 2bf21ca1e..2ddfa694d 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -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; |