commit d2645a9: [Minor] Fix multipattern escaping for TLDs
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Feb 18 21:07:03 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-02-18 21:00:18 +0000
URL: https://github.com/rspamd/rspamd/commit/d2645a9a8ee9d7521658bd04ac7564da63026cd4 (HEAD -> master)
[Minor] Fix multipattern escaping for TLDs
---
src/libutil/multipattern.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c
index c1d0d6499..268170512 100644
--- a/src/libutil/multipattern.c
+++ b/src/libutil/multipattern.c
@@ -99,8 +99,8 @@ rspamd_multipattern_escape_tld_hyperscan (const gchar *pattern, gsize slen,
/*
* We understand the following cases
- * 1) blah -> \\.blah
- * 2) *.blah -> \\..*\\.blah
+ * 1) blah -> .blah
+ * 2) *.blah -> ..*\\.blah
* 3) ???
*/
@@ -116,10 +116,10 @@ rspamd_multipattern_escape_tld_hyperscan (const gchar *pattern, gsize slen,
p ++;
}
- prefix = ".*";
+ prefix = ".*.";
}
else {
- len = slen + 2;
+ len = slen + 1;
prefix = ".";
p = pattern;
}
More information about the Commits
mailing list