From: Andrew Lewis Date: Fri, 24 Feb 2017 11:19:46 +0000 (+0200) Subject: [Minor] URL tags: use base32 encoding X-Git-Tag: 1.5.0~37^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1455%2Fhead;p=rspamd.git [Minor] URL tags: use base32 encoding --- 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