aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libmime/mime_expressions.c2
-rw-r--r--src/libserver/re_cache.c2
-rw-r--r--src/lua/lua_config.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index bbbdaff04..596d959c6 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -690,7 +690,7 @@ rspamd_mime_expr_parse (const gchar *line, gsize len,
state = in_flags_brace;
p ++;
}
- else if (!g_ascii_isalpha (t)) {
+ else if (!g_ascii_isalpha (t) && t != '$') {
state = end_atom;
}
else {
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index c438b6c61..707d220ce 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -831,7 +831,7 @@ rspamd_re_cache_process_selector (struct rspamd_task *task,
lua_pushcfunction (L, &rspamd_lua_traceback);
err_idx = lua_gettop (L);
- lua_pushvalue (L, ref);
+ lua_rawgeti (L, LUA_REGISTRYINDEX, ref);
ptask = lua_newuserdata (L, sizeof (*ptask));
*ptask = task;
rspamd_lua_setclass (L, "rspamd{task}", -1);
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index ccf614300..d72c5ff66 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -3673,6 +3673,10 @@ lua_config_register_re_selector (lua_State *L)
lua_settop (L, top);
lua_pushboolean (L, res);
+ if (res) {
+ msg_info_config ("registered regexp selector %s", name);
+ }
+
return 1;
}