commit 5309a00: [Fix] Avoid double escaping
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jan 13 14:00:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-01-13 13:16:30 +0000
URL: https://github.com/rspamd/rspamd/commit/5309a007ea683b33334c9a853897a211be5657c5
[Fix] Avoid double escaping
---
src/libserver/protocol.c | 10 +++++-----
1 file 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 {
More information about the Commits
mailing list