aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c6
1 files changed, 4 insertions, 2 deletions
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);
}