aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-09 11:06:26 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-09 11:06:26 +0100
commit2ed1aa136fd36e7975ea151ee9e3affbcaa5cf59 (patch)
treea56249962750f6fc04288629730d5b883364a8ed /src/plugins
parent989b808302248f1f8a51724984fdfa97925f5e21 (diff)
downloadrspamd-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.lua8
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