]> source.dussan.org Git - rspamd.git/commitdiff
domain match should be case insensitive 3791/head
authorJesse Norell <jesse@kci.net>
Wed, 9 Jun 2021 22:16:13 +0000 (16:16 -0600)
committerGitHub <noreply@github.com>
Wed, 9 Jun 2021 22:16:13 +0000 (16:16 -0600)
domain match should be case insensitive - see https://github.com/rspamd/rspamd/issues/3749#issuecomment-858013193

src/plugins/lua/dmarc.lua

index aae556c9602effd33c05702b3dddae6afc0e8a40..ef2c89881a964843a54b9dcde8a97b11ed4785ec 100644 (file)
@@ -1199,7 +1199,7 @@ if opts['reporting'] == true then
                   if urlt['protocol'] ~= 'mailto' then
                     rspamd_logger.errx(rspamd_config, 'invalid URL: %s', url)
                   else
-                    if urlt['tld'] == rspamd_util.get_tld(reporting_domain) then
+                    if string.lower(urlt['tld']) == string.lower(rspamd_util.get_tld(reporting_domain)) then
                       reporting_addrs[string.format('%s@%s', urlt['user'], urlt['host'])] = true
                     else
                       to_verify[string.format('%s@%s', urlt['user'], urlt['host'])] = urlt['host']
@@ -1620,4 +1620,4 @@ if opts.munging then
   rspamd_config:register_dependency('ARC_SIGNED', 'DMARC_MUNGED')
 
   rspamd_logger.infox(rspamd_config, 'enabled DMARC munging')
-end
\ No newline at end of file
+end