commit b232442: [Minor] Allow to import any Lua object to message

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Nov 28 13:35:15 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-11-28 13:29:44 +0000
URL: https://github.com/rspamd/rspamd/commit/b2324423b1c5b0b9fa0a7cf173cc4ae903da018f (HEAD -> master)

[Minor] Allow to import any Lua object to message

---
 src/lua/lua_task.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index cb725aadf..0ea1367d5 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2111,7 +2111,7 @@ lua_task_append_message (lua_State * L)
 {
 	LUA_TRACE_POINT;
 	struct rspamd_task *task = lua_check_task (L, 1);
-	const gchar *message = luaL_checkstring (L, 2), *category;
+	const gchar *category;
 
 	if (task != NULL) {
 		if (lua_type (L, 3) == LUA_TSTRING) {
@@ -2122,7 +2122,7 @@ lua_task_append_message (lua_State * L)
 		}
 
 		ucl_object_insert_key (task->messages,
-				ucl_object_fromstring_common (message, 0, UCL_STRING_RAW),
+				ucl_object_lua_import (L, 2),
 				category, 0,
 				true);
 	}


More information about the Commits mailing list