From 4082b890a71c6dbf56f57db1962aba9abe42e70a Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Fri, 24 Feb 2017 13:19:46 +0200 Subject: [PATCH] [Minor] URL tags: use base32 encoding --- src/plugins/lua/url_tags.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/url_tags.lua b/src/plugins/lua/url_tags.lua index 774386e66..8cdc22a6c 100644 --- a/src/plugins/lua/url_tags.lua +++ b/src/plugins/lua/url_tags.lua @@ -232,7 +232,7 @@ local function tags_save(task) for tag, mtags in pairs(domtags) do local tmp2 = {} for k in pairs(mtags) do - table.insert(tmp2, k) + table.insert(tmp2, tostring(rspamd_util.encode_base32(k))) end tmp[tag] = tmp2 end @@ -303,7 +303,7 @@ local function tags_restore(task) tracking[tld][tag] = {} end for _, ttag in ipairs(metatags) do - urls[idx]:add_tag(tag, ttag, mpool) + urls[idx]:add_tag(tag, tostring(rspamd_util.decode_base32(ttag)), mpool) tracking[tld][tag][ttag] = true end end -- 2.39.5