diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-07 11:11:31 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-07 11:15:26 +0100 |
commit | 933b0de3197887c8abbf19e9db68b2f797e6f199 (patch) | |
tree | fd7e777c8bdb2b40c4a468d4d09a3bf66b59af15 /src | |
parent | 042380a5243410b631c14144805e2462b430f47f (diff) | |
download | rspamd-933b0de3197887c8abbf19e9db68b2f797e6f199.tar.gz rspamd-933b0de3197887c8abbf19e9db68b2f797e6f199.zip |
[Fix] Escape json strings for controller rejplies from Lua
Issue: #1581
Diffstat (limited to 'src')
-rw-r--r-- | src/controller.c | 4 |
1 files changed, 2 insertions, 2 deletions
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"); |