diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-09 11:06:26 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-09 11:06:26 +0100 |
commit | 2ed1aa136fd36e7975ea151ee9e3affbcaa5cf59 (patch) | |
tree | a56249962750f6fc04288629730d5b883364a8ed /src/plugins | |
parent | 989b808302248f1f8a51724984fdfa97925f5e21 (diff) | |
download | rspamd-2ed1aa136fd36e7975ea151ee9e3affbcaa5cf59.tar.gz rspamd-2ed1aa136fd36e7975ea151ee9e3affbcaa5cf59.zip |
[WebUI] Do not hide messages with bad subject, just replace it with '???'
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/history_redis.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua index 1564f467c..8a1968542 100644 --- a/src/plugins/lua/history_redis.lua +++ b/src/plugins/lua/history_redis.lua @@ -164,8 +164,7 @@ local function handle_history_request(task, conn, from, to, reset) data = fun.totable( fun.map(function (_, obj) return obj end, fun.filter(function(res, obj) - if res and (not obj.subject or - rspamd_util.is_valid_utf8(obj.subject)) then + if res then return true end return false @@ -180,6 +179,11 @@ local function handle_history_request(task, conn, from, to, reset) return false, nil end end, data)))) + fun.each(function(e) + if e.subject and not rspamd_util.is_valid_utf8(e.subject) then + e.subject = '???' + end + end, data) reply.rows = data conn:send_ucl(reply) else |