{
gint n = G_N_ELEMENTS (static_matchers), i;
- g_array_append_vals (sc->matchers, static_matchers, n);
-
for (i = 0; i < n; i++) {
if (static_matchers[i].flags & URL_FLAG_REGEXP) {
rspamd_multipattern_add_pattern (url_scanner->search_trie,
static_matchers[i].patlen = strlen (static_matchers[i].pattern);
}
+
+ g_array_append_vals (sc->matchers, static_matchers, n);
}
void
rspamd_url_trie_is_match (struct url_matcher *matcher, const gchar *pos,
const gchar *end)
{
+#ifndef WITH_HYPERSCAN
if (matcher->flags & URL_FLAG_TLD_MATCH) {
/* Immediately check pos for valid chars */
if (pos < end) {
}
}
}
-
+#endif
return TRUE;
}
#include "config.h"
#include "libutil/multipattern.h"
#include "libutil/str_util.h"
+#include "logger.h"
#ifdef WITH_HYPERSCAN
#include "hs.h"
fl |= HS_FLAG_CASELESS;
}
if (mp->flags & RSPAMD_MULTIPATTERN_UTF8) {
- fl |= HS_FLAG_UTF8;
+ fl |= HS_FLAG_UTF8|HS_FLAG_UCP;
}
g_array_append_val (mp->hs_flags, fl);