]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Log bad output if proxied connection returns garbadge
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Aug 2018 10:22:49 +0000 (11:22 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Aug 2018 10:23:16 +0000 (11:23 +0100)
src/rspamd_proxy.c

index 4af5ee5f49f5a41f2f8be05b9b685220a00e9337..276e304b9f8e3e6e23aaad6398013beb2ecafb6c 100644 (file)
@@ -917,9 +917,14 @@ proxy_backend_parse_results (struct rspamd_proxy_session *session,
                parser = ucl_parser_new (0);
 
                if (!ucl_parser_add_chunk (parser, in, inlen)) {
+                       gchar *encoded;
+
+                       encoded = rspamd_encode_base64 (in, inlen, 0, NULL);
                        msg_err_session ("cannot parse input: %s", ucl_parser_get_error (
                                        parser));
+                       msg_err_session ("input encoded: %s", encoded);
                        ucl_parser_free (parser);
+                       g_free (encoded);
 
                        return FALSE;
                }