]> source.dussan.org Git - rspamd.git/commitdiff
Raise MISSING_DATE on empty string
authorSteve Freegard <steve@stevefreegard.com>
Tue, 26 Apr 2016 11:44:26 +0000 (12:44 +0100)
committerSteve Freegard <steve@stevefreegard.com>
Tue, 26 Apr 2016 11:44:26 +0000 (12:44 +0100)
rules/misc.lua

index 176dac8538e8a520f410b6c32b8de0537895c0fb..728b694cd1d2f4c14f460f863b3e4c11c01ca18f 100644 (file)
@@ -51,7 +51,8 @@ end
 -- Date issues
 rspamd_config.MISSING_DATE = function(task)
        if rspamd_config:get_api_version() >= 5 then
-               if not task:get_header_raw('Date') then
+               local date = task:get_header_raw('Date')
+               if date == nil or date == '' then
                        return true
                end
        end