commit 1c11c28: [Minor] Core: Do not include full urls in output unless asked

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jan 10 15:49:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-01-10 15:47:30 +0000
URL: https://github.com/rspamd/rspamd/commit/1c11c280f0db0b6386aa2adf1d94a00dd72c9640 (HEAD -> master)

[Minor] Core: Do not include full urls in output unless asked

---
 src/libserver/protocol.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 45051ce51..35463be52 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -1154,13 +1154,16 @@ rspamd_protocol_write_ucl (struct rspamd_task *task,
 	}
 
 	if (flags & RSPAMD_PROTOCOL_URLS) {
-		if (task->cfg->log_urls || (task->flags & RSPAMD_TASK_FLAG_EXT_URLS)) {
+		if (task->flags & RSPAMD_TASK_FLAG_EXT_URLS) {
 			if (g_hash_table_size (task->urls) > 0) {
-				ucl_object_insert_key (top, rspamd_urls_tree_ucl (task->urls,
-						task), "urls", 0, false);
+				ucl_object_insert_key (top,
+						rspamd_urls_tree_ucl (task->urls, task),
+						"urls", 0, false);
 			}
+
 			if (g_hash_table_size (task->emails) > 0) {
-				ucl_object_insert_key (top, rspamd_emails_tree_ucl (task->emails, task),
+				ucl_object_insert_key (top,
+						rspamd_emails_tree_ucl (task->emails, task),
 						"emails", 0, false);
 			}
 		}


More information about the Commits mailing list