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
+3
View File
@@ -18,6 +18,9 @@ Python's __main__ and __init__
As far as I know, __init__ is the initialization script, just like Unix and alike's /etc/init.rc script. It's required to make it so that it's a package.
The double underscores is for signifying that it's a global variable.
b before string, for example b'relaxed' is a way to say that it's a binary string
-----START DKIM DIRECTORY-----
[__init__]
+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())