From 933b0de3197887c8abbf19e9db68b2f797e6f199 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 7 Apr 2017 11:11:31 +0100 Subject: [Fix] Escape json strings for controller rejplies from Lua Issue: #1581 --- src/controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/controller.c') diff --git a/src/controller.c b/src/controller.c index 71d21048f..9b18a1945 100644 --- a/src/controller.c +++ b/src/controller.c @@ -3380,7 +3380,7 @@ static int lua_csession_send_ucl (lua_State *L) { struct rspamd_http_connection_entry *c = lua_check_controller_entry (L, 1); - ucl_object_t *obj = ucl_object_lua_import (L, 2); + ucl_object_t *obj = ucl_object_lua_import_escape (L, 2); if (c) { rspamd_controller_send_ucl (c, obj); @@ -3520,7 +3520,7 @@ rspamd_controller_register_plugins_paths (struct rspamd_controller_worker_ctx *c lua_gettable (L, -3); /* value is at -3 index */ if (lua_istable (L, -1)) { - webui_data = ucl_object_lua_import (L, -1); + webui_data = ucl_object_lua_import_escape (L, -1); while ((cur = ucl_object_iterate (webui_data, &it, true)) != NULL) { handler_obj = ucl_object_lookup (cur, "handler"); -- cgit v1.2.3