From 5309a007ea683b33334c9a853897a211be5657c5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 13 Jan 2020 13:16:30 +0000 Subject: [Fix] Avoid double escaping --- src/libserver/protocol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 255ca50a5..9ffdcd5c7 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -874,15 +874,15 @@ rspamd_protocol_extended_url (struct rspamd_task *task, obj = ucl_object_typed_new (UCL_OBJECT); - elt = ucl_object_fromlstring (encoded, enclen); + elt = ucl_object_fromstring_common (encoded, enclen, 0); ucl_object_insert_key (obj, elt, "url", 0, false); if (url->tldlen > 0) { - elt = ucl_object_fromlstring (url->tld, url->tldlen); + elt = ucl_object_fromstring_common (url->tld, url->tldlen, 0); ucl_object_insert_key (obj, elt, "tld", 0, false); } if (url->hostlen > 0) { - elt = ucl_object_fromlstring (url->host, url->hostlen); + elt = ucl_object_fromstring_common (url->host, url->hostlen, 0); ucl_object_insert_key (obj, elt, "host", 0, false); } @@ -926,10 +926,10 @@ urls_protocol_cb (gpointer key, gpointer value, gpointer ud) goffset err_offset; if ((err_offset = rspamd_fast_utf8_validate (url->host, url->hostlen)) == 0) { - obj = ucl_object_fromlstring (url->host, url->hostlen); + obj = ucl_object_fromstring_common (url->host, url->hostlen, 0); } else { - obj = ucl_object_fromlstring (url->host, err_offset - 1); + obj = ucl_object_fromstring_common (url->host, err_offset - 1, 0); } } else { -- cgit v1.2.3