Final commit, I've learned my lesson
This commit is contained in:
@@ -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
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user