Final commit, I've learned my lesson

This commit is contained in:
Diskette Guy
2025-10-16 04:01:34 +07:00
parent 003a405242
commit 9503fd60b0
3 changed files with 6 additions and 1 deletions
+2
View File
@@ -301,6 +301,7 @@ def validate_signature_fields(sig, mandatory_fields=[b'v', b'a', b'b', b'bh', b'
if b'cv' in sig and sig[b'cv'] not in (CV_Pass, CV_Fail, CV_None):
raise ValidationError("cv= value is not valid (%s)" % sig[b'cv'])
# Somehow convert it to UTF8 before going to this?
# Limit domain validation to ASCII domains because too hard
try:
str(sig[b'd'], 'ascii')
@@ -311,6 +312,7 @@ def validate_signature_fields(sig, mandatory_fields=[b'v', b'a', b'b', b'bh', b'
# Not an ASCII domain
pass
# Nasty hack to support both str and bytes... check for both the
# character and integer values.
if not arc and b'i' in sig and (
+1 -1
View File
@@ -1,7 +1,7 @@
import unittest
import doctest
import dkim
from tests import test_suite
from dkim.tests import test_suite
doctest.testmod(dkim)
unittest.TextTestRunner().run(test_suite())