From a8f11faf7f584916078d6fadb36e0c2f1984e2b0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 6 Mar 2020 14:03:20 +0000 Subject: [Rework] Rework URL structure: adjust tld part --- src/libserver/protocol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libserver/protocol.c') diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 16dc05491..739d3b950 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -878,11 +878,13 @@ rspamd_protocol_extended_url (struct rspamd_task *task, ucl_object_insert_key (obj, elt, "url", 0, false); if (url->tldlen > 0) { - elt = ucl_object_fromstring_common (url->tld, url->tldlen, 0); + elt = ucl_object_fromstring_common (rspamd_url_tld_unsafe (url), + url->tldlen, 0); ucl_object_insert_key (obj, elt, "tld", 0, false); } if (url->hostlen > 0) { - elt = ucl_object_fromstring_common (rspamd_url_host_unsafe (url), url->hostlen, 0); + elt = ucl_object_fromstring_common (rspamd_url_host_unsafe (url), + url->hostlen, 0); ucl_object_insert_key (obj, elt, "host", 0, false); } -- cgit v1.2.3