diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-04-29 14:52:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-04-29 14:52:25 +0100 |
commit | 18e95de8f1fb5f5d756d3bf4db168ad96cd5f954 (patch) | |
tree | cd9d6d2d20d7f1885b1a174c40e495b8e272f8ef /src/rspamadm/lua_repl.c | |
parent | 622bad3d8a52fc810070bb000025c642e5a0695f (diff) | |
download | rspamd-18e95de8f1fb5f5d756d3bf4db168ad96cd5f954.tar.gz rspamd-18e95de8f1fb5f5d756d3bf4db168ad96cd5f954.zip |
[Minor] Improve lua logging escaping
Diffstat (limited to 'src/rspamadm/lua_repl.c')
-rw-r--r-- | src/rspamadm/lua_repl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c index 430c800f9..43c97d01f 100644 --- a/src/rspamadm/lua_repl.c +++ b/src/rspamadm/lua_repl.c @@ -282,7 +282,8 @@ rspamadm_exec_input (lua_State *L, const gchar *input) rspamd_printf ("local function: %d\n", cbref); } else { memset (&tr, 0, sizeof (tr)); - lua_logger_out_type (L, i, outbuf, sizeof (outbuf), &tr); + lua_logger_out_type (L, i, outbuf, sizeof (outbuf), &tr, + LUA_ESCAPE_UNPRINTABLE); rspamd_printf ("%s\n", outbuf); } } @@ -462,7 +463,8 @@ rspamadm_lua_message_handler (lua_State *L, gint argc, gchar **argv) for (j = old_top + 1; j <= lua_gettop (L); j ++) { memset (&tr, 0, sizeof (tr)); - lua_logger_out_type (L, j, outbuf, sizeof (outbuf), &tr); + lua_logger_out_type (L, j, outbuf, sizeof (outbuf), &tr, + LUA_ESCAPE_UNPRINTABLE); rspamd_printf ("%s\n", outbuf); } } |