]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use utf8 length for subject
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 5 Mar 2016 22:20:47 +0000 (22:20 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 5 Mar 2016 22:20:47 +0000 (22:20 +0000)
rules/misc.lua

index e7d047b3fe83d786271bfecb0b1cae4d85908b6b..f3476ee810f1e5df8991d8cf3325a4caac5a055f 100644 (file)
@@ -127,7 +127,7 @@ rspamd_config.SUBJ_ALL_CAPS = {
 rspamd_config.LONG_SUBJ = {
   callback = function(task)
     local sbj = task:get_header('Subject')
-    if sbj and string.len(sbj) > 200 then
+    if sbj and util.strlen_utf8(sbj) > 150 then
       return true
     end
     return false