diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-13 13:16:30 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-13 13:16:30 +0000 |
commit | 5309a007ea683b33334c9a853897a211be5657c5 (patch) | |
tree | c0692b5637362326dd00418295ea5ea9dd32b12e /src | |
parent | f3a1fc705ed0fa856c1ce8eab307ec8607f15096 (diff) | |
download | rspamd-5309a007ea683b33334c9a853897a211be5657c5.tar.gz rspamd-5309a007ea683b33334c9a853897a211be5657c5.zip |
[Fix] Avoid double escaping
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/protocol.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 { |